aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/compat.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/compat.c b/lib/compat.c
index 8580fdb9..b1e386a0 100644
--- a/lib/compat.c
+++ b/lib/compat.c
@@ -161,3 +161,13 @@
return 1;
}
#endif
+
+/* some systems don't take the 2nd argument */
+int sys_gettimeofday(struct timeval *tv)
+{
+#if HAVE_GETTIMEOFDAY_TZ
+ return gettimeofday(tv, NULL);
+#else
+ return gettimeofday(tv);
+#endif
+}