From 2cea02fb85b9b00c3b95d8cd0e39cf91cd2ce289 Mon Sep 17 00:00:00 2001 From: Thomas Munro Date: Thu, 18 Aug 2022 16:12:20 +1200 Subject: [PATCH] Remove configure probe for sys/sockio.h. On BSD-family systems, header defines socket ioctl numbers like SIOCGIFCONF. Only AIX is using those now, but it defines them in anyway. Supposing some PostgreSQL hacker wants to test that AIX-only code path on a more common development system by pretending not to have getifaddrs(). It's enough to include , at least on macOS, FreeBSD and Linux, and we're already doing that. --- configure | 2 +- configure.ac | 1 - src/backend/libpq/ifaddr.c | 4 ---- src/include/pg_config.h.in | 3 --- src/tools/msvc/Solution.pm | 1 - 5 files changed, 1 insertion(+), 10 deletions(-) diff --git a/configure b/configure index 0a2fb7a4089..6f220b9eb98 100755 --- a/configure +++ b/configure @@ -13761,7 +13761,7 @@ $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h fi -for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.h langinfo.h mbarrier.h netinet/tcp.h sys/epoll.h sys/event.h sys/personality.h sys/prctl.h sys/procctl.h sys/signalfd.h sys/sockio.h sys/ucred.h termios.h ucred.h +for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.h langinfo.h mbarrier.h netinet/tcp.h sys/epoll.h sys/event.h sys/personality.h sys/prctl.h sys/procctl.h sys/signalfd.h sys/ucred.h termios.h ucred.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" diff --git a/configure.ac b/configure.ac index e9de78bbd4b..48d3e882b3e 100644 --- a/configure.ac +++ b/configure.ac @@ -1457,7 +1457,6 @@ AC_CHECK_HEADERS(m4_normalize([ sys/prctl.h sys/procctl.h sys/signalfd.h - sys/sockio.h sys/ucred.h termios.h ucred.h diff --git a/src/backend/libpq/ifaddr.c b/src/backend/libpq/ifaddr.c index a0cad5405e1..73a8707324f 100644 --- a/src/backend/libpq/ifaddr.c +++ b/src/backend/libpq/ifaddr.c @@ -325,10 +325,6 @@ pg_foreach_ifaddr(PgIfAddrCallback callback, void *cb_data) #include #include -#ifdef HAVE_SYS_SOCKIO_H -#include -#endif - #if defined(SIOCGIFCONF) /* diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in index eff09ba0bc5..de8daa2f114 100644 --- a/src/include/pg_config.h.in +++ b/src/include/pg_config.h.in @@ -490,9 +490,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SIGNALFD_H -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SOCKIO_H - /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm index 6aeab3aefca..5ad275b2236 100644 --- a/src/tools/msvc/Solution.pm +++ b/src/tools/msvc/Solution.pm @@ -359,7 +359,6 @@ sub GenerateFiles HAVE_SYS_PRCTL_H => undef, HAVE_SYS_PROCCTL_H => undef, HAVE_SYS_SIGNALFD_H => undef, - HAVE_SYS_SOCKIO_H => undef, HAVE_SYS_STAT_H => 1, HAVE_SYS_TYPES_H => 1, HAVE_SYS_UCRED_H => undef,