]> Savannah Git Hosting - gnulib.git/commitdiff
net_if: Handle content-free <net/if.h> system headers
authorKevin Cernekee <cernekee@google.com>
Wed, 11 Feb 2015 23:22:56 +0000 (15:22 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 11 Feb 2015 23:47:45 +0000 (15:47 -0800)
* m4/net_if_h.m4: Check to make sure <net/if.h> actually defines
struct if_nameindex.  If not, enable the replacement header.

ChangeLog
m4/net_if_h.m4

index 9fc1f5621b7c66cf710194236b2d5ae2b9d762e5..7edb7276290cc7b0aa8b70f1a73c90a9588e855d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
        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  <ueno@gnu.org>
 
        uniname/unimame-tests: don't link with -lunistring
index b6ebc73337625eb3063c61d20c25c9ac4979b433..9db391c5fec6a2a9b4dbaab95bc2e11c658eca91 100644 (file)
@@ -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])
     ])