From: Kevin Cernekee Date: Wed, 11 Feb 2015 23:22:56 +0000 (-0800) Subject: net_if: Handle content-free system headers X-Git-Tag: v1.0~7149 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=14acd1e1a03ed90a4fc09f263edbbdc3ed712012;p=gnulib.git net_if: Handle content-free system headers * m4/net_if_h.m4: Check to make sure actually defines struct if_nameindex. If not, enable the replacement header. --- diff --git a/ChangeLog b/ChangeLog index 9fc1f5621b..7edb727629 100644 --- a/ChangeLog +++ b/ChangeLog @@ -52,6 +52,10 @@ linkat_nofollow: Add fallback case for cross compiling * m4/linkat.m4: Guess no for Darwin, yes otherwise. + net_if: Handle content-free system headers + * m4/net_if_h.m4: Check to make sure actually defines + struct if_nameindex. If not, enable the replacement header. + 2015-02-08 Daiki Ueno uniname/unimame-tests: don't link with -lunistring diff --git a/m4/net_if_h.m4 b/m4/net_if_h.m4 index b6ebc73337..9db391c5fe 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 is self-contained], [gl_cv_header_net_if_h_selfcontained], [ - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[]])], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[struct if_nameindex ni;]])], [gl_cv_header_net_if_h_selfcontained=yes], [gl_cv_header_net_if_h_selfcontained=no]) ])