Commit 800f751
melib/utils: remove tz arg in gettimeofday
The timezone struct is deprecated in the gettimeofday function, void in
macOS and nullable in Linux systems, from the manpages of
gettimeofday(2) in macOS, the signature is:
int
gettimeofday(struct timeval *restrict tp, void *restrict tzp);
In ubuntu manpage:
int gettimeofday(struct timeval *restrict tv,
struct timezone *_Nullable restrict tz);
Passing a null parameter to gettimeofday matches the expectation in the
modern implementations of libc and avoids EXC_BAD_ACCESS errors in
inlined-optimized builds.
Signed-off-by: nrxr <[email protected]>1 parent a1e1515 commit 800f751
1 file changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
554 | 554 | | |
555 | 555 | | |
556 | 556 | | |
557 | | - | |
558 | 557 | | |
559 | | - | |
| 558 | + | |
560 | 559 | | |
561 | 560 | | |
562 | 561 | | |
| |||
0 commit comments