Remove configure probe for sys/sockio.h.
authorThomas Munro <[email protected]>
Thu, 18 Aug 2022 04:12:20 +0000 (16:12 +1200)
committerThomas Munro <[email protected]>
Thu, 18 Aug 2022 04:31:11 +0000 (16:31 +1200)
On BSD-family systems, header <sys/sockio.h> defines socket ioctl
numbers like SIOCGIFCONF.  Only AIX is using those now, but it defines
them in <net/if.h> 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 <sys/ioctl.h>, at least on macOS,
FreeBSD and Linux, and we're already doing that.

configure
configure.ac
src/backend/libpq/ifaddr.c
src/include/pg_config.h.in
src/tools/msvc/Solution.pm

index 0a2fb7a40898dce7620211cd99b50775f0179bd2..6f220b9eb982aa34ff69869616d40484881000f3 100755 (executable)
--- 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"
index e9de78bbd4bcaef525ac73cc3614ef831de3f508..48d3e882b3edb6267c091bb2a34d78a0a026f44a 100644 (file)
@@ -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
index a0cad5405e143e8529aa042bd871b467750084fa..73a8707324f36aae714c1fba4fefdd5c432b732e 100644 (file)
@@ -325,10 +325,6 @@ pg_foreach_ifaddr(PgIfAddrCallback callback, void *cb_data)
 #include <sys/ioctl.h>
 #include <net/if.h>
 
-#ifdef HAVE_SYS_SOCKIO_H
-#include <sys/sockio.h>
-#endif
-
 #if defined(SIOCGIFCONF)
 
 /*
index eff09ba0bc5d1969e1286c6be4977f7af5a468ad..de8daa2f1140cc6370c20dce5fca87c9394c9a02 100644 (file)
 /* Define to 1 if you have the <sys/signalfd.h> header file. */
 #undef HAVE_SYS_SIGNALFD_H
 
-/* Define to 1 if you have the <sys/sockio.h> header file. */
-#undef HAVE_SYS_SOCKIO_H
-
 /* Define to 1 if you have the <sys/stat.h> header file. */
 #undef HAVE_SYS_STAT_H
 
index 6aeab3aefcad99aaa2e55cc239ab07e7264780d2..5ad275b223620120b6c172e9c6fd01ea9114935a 100644 (file)
@@ -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,