tests: do not use settimeofday wrapper provided by libc

Workaround limitations of settimeofday wrapper provided by musl libc.

* tests/xettimeofday.c (main): Call settimeofday using syscall().

Reported-by: Szabolcs Nagy <nsz@port70.net>
This commit is contained in:
2016-01-09 01:47:42 +00:00
parent 19ff2b2ee7
commit 8249eeb5d4

View File

@ -60,7 +60,7 @@ main(void)
t.tv.tv_sec = -1;
t.tv.tv_usec = 1000000000;
assert(settimeofday(&t.tv, &t.tz) == -1);
assert(syscall(__NR_settimeofday, &t.tv, &t.tz) == -1);
printf("settimeofday({%jd, %jd}"
", {tz_minuteswest=%d, tz_dsttime=%d})"
" = -1 EINVAL (%m)\n",