aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/encoding/time_fmt.c4
-rw-r--r--src/lib/evloop/timers.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/encoding/time_fmt.c b/src/lib/encoding/time_fmt.c
index a921fc681c..233d0dddff 100644
--- a/src/lib/encoding/time_fmt.c
+++ b/src/lib/encoding/time_fmt.c
@@ -26,6 +26,10 @@
#include <string.h>
#include <time.h>
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
#ifdef _WIN32
/* For struct timeval */
#include <winsock2.h>
diff --git a/src/lib/evloop/timers.c b/src/lib/evloop/timers.c
index c4e85c7c93..3603bf1a7d 100644
--- a/src/lib/evloop/timers.c
+++ b/src/lib/evloop/timers.c
@@ -39,6 +39,10 @@
#include "lib/malloc/malloc.h"
#include "lib/time/compat_time.h"
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
#ifdef _WIN32
// For struct timeval.
#include <winsock2.h>