*: fix detection and usage of sys/cdefs.h
This header is non-standard (though present on many systems) and
there is no standard for what it should or should not define.
Remove it where it is not really needed. But add also a configure
check, so it can be used if available but otherwise fallback to
defining the needed macroes.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
diff --git a/configure.ac b/configure.ac
index 220124a..3dba3b3 100755
--- a/configure.ac
+++ b/configure.ac
@@ -442,7 +442,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/param.h limits.h signal.h \
+ sys/cdefs.h sys/param.h limits.h signal.h \
sys/socket.h netinet/in.h time.h sys/time.h])
dnl Utility macro to avoid retyping includes all the time