]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Include sys/time.h in timers.c and time_fmt.c
authorKris Katterjohn <katterjohn@gmail.com>
Sat, 3 Nov 2018 19:28:27 +0000 (14:28 -0500)
committerNick Mathewson <nickm@torproject.org>
Tue, 6 Nov 2018 20:15:22 +0000 (15:15 -0500)
This fixes compilation on OpenBSD.

Signed-off-by: Kris Katterjohn <katterjohn@gmail.com>
src/lib/encoding/time_fmt.c
src/lib/evloop/timers.c

index a921fc681c6e75dfdc4dbc45c79a4de81c910edd..233d0dddff8a2855f47209040ceffc7504715070 100644 (file)
 #include <string.h>
 #include <time.h>
 
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
 #ifdef _WIN32
 /* For struct timeval */
 #include <winsock2.h>
index c4e85c7c93118c7ddf2ac8fc4ce1ad74b3e48d55..3603bf1a7d6684f08b9db56414f34a74722d338e 100644 (file)
 #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>