[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/release-0.3.5] Include sys/time.h in timers.c and time_fmt.c



commit daaa2751ed6ea8fe6941b63ea819804d8f0a9fac
Author: Kris Katterjohn <katterjohn@xxxxxxxxx>
Date:   Sat Nov 3 14:28:27 2018 -0500

    Include sys/time.h in timers.c and time_fmt.c
    
    This fixes compilation on OpenBSD.
    
    Signed-off-by: Kris Katterjohn <katterjohn@xxxxxxxxx>
---
 src/lib/encoding/time_fmt.c | 4 ++++
 src/lib/evloop/timers.c     | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/src/lib/encoding/time_fmt.c b/src/lib/encoding/time_fmt.c
index a921fc681..233d0dddf 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 c4e85c7c9..3603bf1a7 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>



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits