From 14acd1e1a03ed90a4fc09f263edbbdc3ed712012 Mon Sep 17 00:00:00 2001 From: Kevin Cernekee Date: Wed, 11 Feb 2015 15:22:56 -0800 Subject: [PATCH] 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. --- ChangeLog | 4 ++++ m4/net_if_h.m4 | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) 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]) ]) -- 2.39.5