[gdb/build] Fix typo sys/sockets.h -> sys/socket.h
authorTom de Vries <tdevries@suse.de>
Mon, 27 Jul 2020 11:46:27 +0000 (13:46 +0200)
committerTom de Vries <tdevries@suse.de>
Mon, 27 Jul 2020 11:46:27 +0000 (13:46 +0200)
I'm running into a build breaker:
...
src/gdb/ser-tcp.c:65:13: error: conflicting declaration ‘typedef int
socklen_t’
   65 | typedef int socklen_t;
      |             ^~~~~~~~~
In file included from ../gnulib/import/unistd.h:40,
                 from
/home/vries/gdb_versions/devel/src/gdb/../gnulib/import/pathmax.h:42,
                 from
/home/vries/gdb_versions/devel/src/gdb/../gdbsupport/common-defs.h:120,
                 from src/gdb/defs.h:28,
                 from src/gdb/ser-tcp.c:20:
/usr/include/unistd.h:277:21: note: previous declaration as ‘typedef
__socklen_t socklen_t’
  277 | typedef __socklen_t socklen_t;
      |                     ^~~~~~~~~
...
after commit 05a6b8c28b "Don't unnecessarily redefine 'socklen_t' type in
MinGW builds".

The root cause is a typo in gdb/configure.ac, using sys/sockets.h where
sys/socket.h was meant:
...
AC_CHECK_HEADERS([sys/sockets.h])
...

Fix the typo.

Build and tested on x86_64-linux.

gdb/ChangeLog:

2020-07-27  Tom de Vries  <tdevries@suse.de>

* configure.ac: Fix sys/sockets.h -> sys/socket.h typo.
* config.in: Regenerate.
* configure: Regenerate.

gdb/ChangeLog
gdb/config.in
gdb/configure
gdb/configure.ac

index c8af86bfcaa741820ff28760f7302cf0269098b4..1d00d15e17610d6d68712374a53ff01a3e4f070e 100644 (file)
@@ -1,3 +1,9 @@
+2020-07-27  Tom de Vries  <tdevries@suse.de>
+
+       * configure.ac: Fix sys/sockets.h -> sys/socket.h typo.
+       * config.in: Regenerate.
+       * configure: Regenerate.
+
 2020-07-26  Eli Zaretskii  <eliz@gnu.org>
 
        * configure.ac (AC_CHECK_HEADERS): Check for sys/socket.h and
index 26053475db92729e48525d12497eea994bc86de5..1aeb8603a1474a50a5678b72dbfac9662e0980d9 100644 (file)
 /* Define to 1 if you have the <sys/select.h> header file. */
 #undef HAVE_SYS_SELECT_H
 
-/* Define to 1 if you have the <sys/sockets.h> header file. */
-#undef HAVE_SYS_SOCKETS_H
-
 /* Define to 1 if you have the <sys/socket.h> header file. */
 #undef HAVE_SYS_SOCKET_H
 
index c9a4b42ea12c744043a22b521377e5b7cf871bbd..adcfa49c633d50e3cfef75bf630d80575c083451 100755 (executable)
 done
 
 
-for ac_header in sys/sockets.h
+for ac_header in sys/socket.h
 do :
-  ac_fn_c_check_header_mongrel "$LINENO" "sys/sockets.h" "ac_cv_header_sys_sockets_h" "$ac_includes_default"
-if test "x$ac_cv_header_sys_sockets_h" = xyes; then :
+  ac_fn_c_check_header_mongrel "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_socket_h" = xyes; then :
   cat >>confdefs.h <<_ACEOF
-#define HAVE_SYS_SOCKETS_H 1
+#define HAVE_SYS_SOCKET_H 1
 _ACEOF
 
 fi
index 3bec21560e75e43d3106f035df0dfd3f191c8ec9..620ae23e3435a60861d8ea5c17f8a90e809b5ed4 100644 (file)
@@ -1248,7 +1248,7 @@ AC_CHECK_HEADERS(term.h, [], [],
 #endif
 ])
 
-AC_CHECK_HEADERS([sys/sockets.h])
+AC_CHECK_HEADERS([sys/socket.h])
 AC_CHECK_HEADERS([ws2tcpip.h])
 
 # ------------------------- #