* m4/net_if_h.m4: Check to make sure <net/if.h> actually defines struct if_nameindex. If not, enable the replacement header. --- ChangeLog | 4 ++++ m4/net_if_h.m4 | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog index 8cd014b3cf58..d17b2220125b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -42,6 +42,10 @@ linkat_nofollow: Add fallback case for cross compiling * m4/linkat.m4: Guess no for Darwin, yes otherwise. + net_if: Handle content-free <net/if.h> system headers + * m4/net_if_h.m4: Check to make sure <net/if.h> actually defines + struct if_nameindex. If not, enable the replacement header. + 2015-02-08 Daiki Ueno <u...@gnu.org> uniname/unimame-tests: don't link with -lunistring diff --git a/m4/net_if_h.m4 b/m4/net_if_h.m4 index b6ebc7333762..9db391c5fec6 100644 --- a/m4/net_if_h.m4 +++ b/m4/net_if_h.m4 @@ -9,7 +9,8 @@ AC_DEFUN([gl_HEADER_NET_IF], AC_CACHE_CHECK([whether <net/if.h> is self-contained], [gl_cv_header_net_if_h_selfcontained], [ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <net/if.h>]], [[]])], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <net/if.h>]], + [[struct if_nameindex ni;]])], [gl_cv_header_net_if_h_selfcontained=yes], [gl_cv_header_net_if_h_selfcontained=no]) ]) -- 2.2.0.rc0.207.ga3a616c