summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaul Jakma <paul@quagga.net>2009-06-18 17:38:01 +0100
committerPaul Jakma <paul@quagga.net>2009-06-18 20:18:31 +0100
commit6511cab26728453d1b5e572bbbc3775f70c10c0e (patch)
tree586184e1e02aedbf67d4ebca145980f8f402ae62 /lib
parentc4376c9d28f1282f502ed5279ee80ec5c4cb810d (diff)
[configure] Refine CLOCK_MONOTONIC test
* configure.ac: Check for the actual CLOCK_MONOTONIC symbol, as clock_gettime need not imply that clock type is supported * lib/zebra.h: use the method given in autoconf docs for sys/time.h inclusion
Diffstat (limited to 'lib')
-rw-r--r--lib/zebra.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/zebra.h b/lib/zebra.h
index 2716460f..2dc84514 100644
--- a/lib/zebra.h
+++ b/lib/zebra.h
@@ -55,7 +55,6 @@ typedef int socklen_t;
#include <sys/select.h>
#endif /* HAVE_SYS_SELECT_H */
#include <sys/stat.h>
-#include <sys/time.h>
#include <sys/types.h>
#include <sys/param.h>
#ifdef HAVE_SYS_SYSCTL_H
@@ -72,7 +71,16 @@ typedef int socklen_t;
#include <sys/ksym.h>
#endif /* HAVE_SYS_KSYM_H */
#include <syslog.h>
-#include <time.h>
+#ifdef TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+#endif /* TIME_WITH_SYS_TIME */
#include <sys/uio.h>
#include <sys/utsname.h>
#ifdef HAVE_RUSAGE