From 95420d3027046667088c7d1d6725d330bb417461 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Mon, 27 Jul 2020 13:46:27 +0200 Subject: [PATCH] [gdb/build] Fix typo sys/sockets.h -> sys/socket.h MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 * configure.ac: Fix sys/sockets.h -> sys/socket.h typo. * config.in: Regenerate. * configure: Regenerate. --- gdb/ChangeLog | 6 ++++++ gdb/config.in | 3 --- gdb/configure | 8 ++++---- gdb/configure.ac | 2 +- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c8af86bfcaa..1d00d15e176 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2020-07-27 Tom de Vries + + * configure.ac: Fix sys/sockets.h -> sys/socket.h typo. + * config.in: Regenerate. + * configure: Regenerate. + 2020-07-26 Eli Zaretskii * configure.ac (AC_CHECK_HEADERS): Check for sys/socket.h and diff --git a/gdb/config.in b/gdb/config.in index 26053475db9..1aeb8603a14 100644 --- a/gdb/config.in +++ b/gdb/config.in @@ -505,9 +505,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SELECT_H -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SOCKETS_H - /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H diff --git a/gdb/configure b/gdb/configure index c9a4b42ea12..adcfa49c633 100755 --- a/gdb/configure +++ b/gdb/configure @@ -11844,12 +11844,12 @@ fi 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 diff --git a/gdb/configure.ac b/gdb/configure.ac index 3bec21560e7..620ae23e343 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -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]) # ------------------------- # -- 2.30.2