From 1cacdef0d1a3f587691735d1822d584b68eba593 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 31 Aug 2021 17:08:00 +0100 Subject: [PATCH] libstdc++: Fix broken autoconf check for O_NONBLOCK Signed-off-by: Jonathan Wakely libstdc++-v3/ChangeLog: * configure.ac: Fix checks for F_GETFL, F_SETFL and O_NONBLOCK. * configure: Regenerate. --- libstdc++-v3/configure | 8 ++++---- libstdc++-v3/configure.ac | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 138b99f42c4..13d52eb0c0e 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -76660,20 +76660,20 @@ fi done -ac_fn_c_check_decl "$LINENO" "F_GETFL" "ac_cv_have_decl_F_GETFL" "fcntl.h +ac_fn_c_check_decl "$LINENO" "F_GETFL" "ac_cv_have_decl_F_GETFL" "#include " if test "x$ac_cv_have_decl_F_GETFL" = xyes; then : fi -ac_fn_c_check_decl "$LINENO" "F_SETFL" "ac_cv_have_decl_F_SETFL" "fcntl.h +ac_fn_c_check_decl "$LINENO" "F_SETFL" "ac_cv_have_decl_F_SETFL" "#include " if test "x$ac_cv_have_decl_F_SETFL" = xyes; then : fi -if "$ac_cv_have_decl_F_GETFL$ac_cv_have_decl_F_SETFL" = 11 ; then - ac_fn_c_check_decl "$LINENO" "O_NONBLOCK" "ac_cv_have_decl_O_NONBLOCK" "fcntl.h +if test "$ac_cv_have_decl_F_GETFL$ac_cv_have_decl_F_SETFL" = yesyes ; then + ac_fn_c_check_decl "$LINENO" "O_NONBLOCK" "ac_cv_have_decl_O_NONBLOCK" "#include " if test "x$ac_cv_have_decl_O_NONBLOCK" = xyes; then : diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac index d29efa6cb5f..2d68b3672b9 100644 --- a/libstdc++-v3/configure.ac +++ b/libstdc++-v3/configure.ac @@ -481,10 +481,10 @@ GLIBCXX_CHECK_FILESYSTEM_DEPS # For Networking TS. AC_CHECK_HEADERS([fcntl.h sys/ioctl.h sys/socket.h sys/uio.h poll.h netdb.h arpa/inet.h netinet/in.h netinet/tcp.h]) -AC_CHECK_DECL(F_GETFL,[],[],[fcntl.h]) -AC_CHECK_DECL(F_SETFL,[],[],[fcntl.h]) -if [ "$ac_cv_have_decl_F_GETFL$ac_cv_have_decl_F_SETFL" = 11 ]; then - AC_CHECK_DECL(O_NONBLOCK,[],[],[fcntl.h]) +AC_CHECK_DECL(F_GETFL,,,[#include ]) +AC_CHECK_DECL(F_SETFL,,,[#include ]) +if test "$ac_cv_have_decl_F_GETFL$ac_cv_have_decl_F_SETFL" = yesyes ; then + AC_CHECK_DECL(O_NONBLOCK,,,[#include ]) fi # For Transactional Memory TS