summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorKevin Cernekee <cernekee@google.com>2015-02-11 15:22:56 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2015-02-11 15:47:45 -0800
commit14acd1e1a03ed90a4fc09f263edbbdc3ed712012 (patch)
treef54d31549308d5627c9b1d21b5ee507220bd3399 /m4
parentf1514e591d047866c1a8c25c27d8ab5614a681c5 (diff)
downloadgnulib-14acd1e1a03ed90a4fc09f263edbbdc3ed712012.tar.gz
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.
Diffstat (limited to 'm4')
-rw-r--r--m4/net_if_h.m43
1 files changed, 2 insertions, 1 deletions
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 <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])
])