fgets: avoid arithmetic overflow when n==INT_MIN is passed
[musl] / src / linux / stime.c
index 6a7e9e8..7d0443b 100644 (file)
@@ -1,7 +1,8 @@
 #define _GNU_SOURCE
+#include <time.h>
 #include <sys/time.h>
 
-int stime(time_t *t)
+int stime(const time_t *t)
 {
        struct timeval tv = { .tv_sec = *t, .tv_usec = 0 };
        return settimeofday(&tv, (void *)0);