summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/src/linux/stime.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc-top-half/musl/src/linux/stime.c')
-rw-r--r--libc-top-half/musl/src/linux/stime.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/linux/stime.c b/libc-top-half/musl/src/linux/stime.c
new file mode 100644
index 0000000..7d0443b
--- /dev/null
+++ b/libc-top-half/musl/src/linux/stime.c
@@ -0,0 +1,9 @@
+#define _GNU_SOURCE
+#include <time.h>
+#include <sys/time.h>
+
+int stime(const time_t *t)
+{
+ struct timeval tv = { .tv_sec = *t, .tv_usec = 0 };
+ return settimeofday(&tv, (void *)0);
+}