* configure.ac: Check for features.h, which is needed to get Clang to
  define __STDC_IEC_559__.
* lib/{stream.c,zebra.h}: move the features.h include to zebra.h, so
  lib/network.c also gets it.
---
 configure.ac | 2 +-
 lib/stream.c | 2 --
 lib/zebra.h  | 4 ++++
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 6da9c14..f027762 100755
--- a/configure.ac
+++ b/configure.ac
@@ -496,7 +496,7 @@ dnl -------------------------
 AC_CHECK_HEADERS([stropts.h sys/ksym.h sys/times.h sys/select.h \
        sys/types.h linux/version.h netdb.h asm/types.h \
        sys/cdefs.h sys/param.h limits.h signal.h \
-       sys/socket.h netinet/in.h time.h sys/time.h])
+       sys/socket.h netinet/in.h time.h sys/time.h features.h])
 
 dnl Utility macro to avoid retyping includes all the time
 m4_define([QUAGGA_INCLUDES],
diff --git a/lib/stream.c b/lib/stream.c
index 43575e1..b50992d 100644
--- a/lib/stream.c
+++ b/lib/stream.c
@@ -22,8 +22,6 @@
 
 #include <zebra.h>
 #include <stddef.h>
-/* primarily for __STDC_IEC_559__ with clang */
-#include <features.h>
 
 #include "stream.h"
 #include "memory.h"
diff --git a/lib/zebra.h b/lib/zebra.h
index 276c38e..38165b0 100644
--- a/lib/zebra.h
+++ b/lib/zebra.h
@@ -94,6 +94,10 @@ typedef int socklen_t;
 #ifdef HAVE_STDBOOL_H
 #include <stdbool.h>
 #endif
+/* primarily for __STDC_IEC_559__ with clang */
+#ifdef HAVE_FEATURES_H
+#include <features.h>
+#endif
 
 /* machine dependent includes */
 #ifdef SUNOS_5
-- 
2.5.5


_______________________________________________
Quagga-dev mailing list
[email protected]
https://lists.quagga.net/mailman/listinfo/quagga-dev

Reply via email to