summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/configure.in11
1 files changed, 10 insertions, 1 deletions
diff --git a/source3/configure.in b/source3/configure.in
index f435366d09..5ebb3c1e14 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -958,7 +958,16 @@ AC_CACHE_CHECK([for struct timespec type],samba_cv_struct_timespec, [
#include <stdlib.h>
#include <stddef.h>
#endif
-#include <time.h>
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+#endif
#if HAVE_AIO_H
#include <aio.h>
#endif