summaryrefslogtreecommitdiff
path: root/compat/time32/settimeofday_time32.c
diff options
context:
space:
mode:
Diffstat (limited to 'compat/time32/settimeofday_time32.c')
-rw-r--r--compat/time32/settimeofday_time32.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/compat/time32/settimeofday_time32.c b/compat/time32/settimeofday_time32.c
new file mode 100644
index 00000000..09e625cb
--- /dev/null
+++ b/compat/time32/settimeofday_time32.c
@@ -0,0 +1,10 @@
+#define _BSD_SOURCE
+#include "time32.h"
+#include <sys/time.h>
+
+int __settimeofday_time32(const struct timeval32 *tv32, const void *tz)
+{
+ return settimeofday(!tv32 ? 0 : (&(struct timeval){
+ .tv_sec = tv32->tv_sec,
+ .tv_usec = tv32->tv_usec}), 0);
+}