build: Test for features.h and move include to lib/zebra.h
* 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.
diff --git a/configure.ac b/configure.ac
index ec0351d..c35a111 100755
--- a/configure.ac
+++ b/configure.ac
@@ -442,7 +442,7 @@
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 0ea5ee4..7c4adf1 100644
--- a/lib/zebra.h
+++ b/lib/zebra.h
@@ -94,6 +94,10 @@
#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