소스 검색

Include sys/time.h in timers.c and time_fmt.c

This fixes compilation on OpenBSD.

Signed-off-by: Kris Katterjohn <katterjohn@gmail.com>
Kris Katterjohn 5 년 전
부모
커밋
daaa2751ed
2개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      src/lib/encoding/time_fmt.c
  2. 4 0
      src/lib/evloop/timers.c

+ 4 - 0
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>

+ 4 - 0
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>