configure: Check for deprecation warnings from sys/sysctl.h.

The warning was added in glibc 2.30.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
feature/deterministic
Alexandre Julliard 2020-04-27 14:53:02 +02:00
parent 98eaef3ad9
commit 9a37560060
2 changed files with 32 additions and 2 deletions

22
configure vendored
View File

@ -7559,7 +7559,7 @@ fi
for ac_header in sys/mount.h sys/statfs.h sys/sysctl.h sys/user.h sys/vfs.h
for ac_header in sys/mount.h sys/statfs.h sys/user.h sys/vfs.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include <sys/types.h>
@ -7577,6 +7577,26 @@ fi
done
saved_sysctl_h_CFLAGS=$CFLAGS
test "x${GCC}" != xyes || CFLAGS="$CFLAGS -Werror"
for ac_header in sys/sysctl.h
do :
ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "#include <sys/types.h>
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
"
if test "x$ac_cv_header_sys_sysctl_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_SYS_SYSCTL_H 1
_ACEOF
fi
done
CFLAGS=$saved_sysctl_h_CFLAGS
for ac_header in \
netinet/ip.h \
net/if.h \

View File

@ -547,12 +547,22 @@ AC_HEADER_STAT()
dnl **** Checks for headers that depend on other ones ****
AC_CHECK_HEADERS([sys/mount.h sys/statfs.h sys/sysctl.h sys/user.h sys/vfs.h],,,
AC_CHECK_HEADERS([sys/mount.h sys/statfs.h sys/user.h sys/vfs.h],,,
[#include <sys/types.h>
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif])
dnl check for broken Linux sysctl.h that causes deprecation warnings
saved_sysctl_h_CFLAGS=$CFLAGS
test "x${GCC}" != xyes || CFLAGS="$CFLAGS -Werror"
AC_CHECK_HEADERS([sys/sysctl.h],,,
[#include <sys/types.h>
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif])
CFLAGS=$saved_sysctl_h_CFLAGS
AC_CHECK_HEADERS(\
netinet/ip.h \
net/if.h \