Browse Source

Added missing parameter to `gettimeofday`

Tohei Ichikawa 3 months ago
parent
commit
876f1c02b7
2 changed files with 10 additions and 2 deletions
  1. 2 2
      core/sys/linux/sys.odin
  2. 8 0
      core/sys/linux/types.odin

+ 2 - 2
core/sys/linux/sys.odin

@@ -1412,8 +1412,8 @@ umask :: proc "contextless" (mask: Mode) -> Mode {
 	Get current time.
 	Available since Linux 1.0.
 */
-gettimeofday :: proc "contextless" (tv: ^Time_Val) -> (Errno) {
-	ret := syscall(SYS_gettimeofday, tv)
+gettimeofday :: proc "contextless" (tv: ^Time_Val, tz: ^Time_Zone) -> (Errno) {
+	ret := syscall(SYS_gettimeofday, tv, tz)
 	return Errno(-ret)
 }
 

+ 8 - 0
core/sys/linux/types.odin

@@ -72,6 +72,14 @@ Time_Val :: struct {
 	microseconds: int,
 }
 
+/*
+	Represents a time zone.
+*/
+Time_Zone :: struct {
+	minutes_west: int,
+	dst_time:     int,
+}
+
 /*
 	Access and modification times for files
 */