From: Tom de Vries <tdevries@suse.de>
To: Joel Brobecker <brobecker@adacore.com>, Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org
Subject: [committed][gdb/build] Fix typo sys/sockets.h -> sys/socket.h
Date: Mon, 27 Jul 2020 13:48:08 +0200 [thread overview]
Message-ID: <06b2ef8b-9e00-5e61-1472-7fec02abcc1c@suse.de> (raw)
In-Reply-To: <1659c771-a0ee-880a-b84a-91eab790eea7@suse.de>
[-- Attachment #1: Type: text/plain, Size: 2446 bytes --]
[ was: Re: Building today's snapshot of GDB with MinGW ]
On 7/27/20 12:26 PM, Tom de Vries wrote:
> On 7/27/20 12:05 PM, Tom de Vries wrote:
>> On 7/27/20 11:49 AM, Tom de Vries wrote:
>>> On 7/3/20 5:25 PM, Joel Brobecker wrote:
>>>>> I can submit a change, but it would be difficult for me to try it, and
>>>>> regenerate configure in general (I don't have the right version of
>>>>> Autotools installed). Would it be okay to send a change and ask
>>>>> someone to do the rest?
>>>>
>>>> No problem; if you send me the configure.xxx change, I can re-run
>>>> autoconf et al, and send you a diff with the regenerated files.
>>>> We can do that as a private exchange to avoid bothering everyone
>>>> else for that part.
>>>>
>>>
>>> Hi,
>>>
>>> [ I suppose this is the last message related to commit 05a6b8c28b "Don't
>>> unnecessarily redefine 'socklen_t' type in MinGW builds.". ]
>>>
>>> I ran into a build breaker related to this commit:
>>> ...
>>> 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 /home/vries/gdb_versions/devel/src/gdb/defs.h:28,
>>> from /home/vries/gdb_versions/devel/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;
>>> | ^~~~~~~~~
>>> ...
>>>
>>
>> Hmm, this looks fishy:
>> ...
>> /* 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
>> ...
>>
>> Anyway, in configure.ac, the check for HAVE_SYS_SOCKET_H comes before
>> the check for HAVE_SOCKLEN_T, but in configure, that order is reversed,
>> which is the root cause for the breakage.
>>
>> It looks like AC_CHECK_HEADERS accumulated checks for different header
>> files, and that that caused the order reversal.
>>
>
> Scrap that.
>
> It's a typo : sys/sockets.h instead of sys/socket.h.
Fixed in patch below, committed.
Thanks,
- Tom
[-- Attachment #2: 0001-gdb-build-Fix-typo-sys-sockets.h-sys-socket.h.patch --]
[-- Type: text/x-patch, Size: 2727 bytes --]
[gdb/build] Fix typo sys/sockets.h -> sys/socket.h
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/config.in | 3 ---
gdb/configure | 8 ++++----
gdb/configure.ac | 2 +-
3 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/gdb/config.in b/gdb/config.in
index 26053475db..1aeb8603a1 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -505,9 +505,6 @@
/* 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
diff --git a/gdb/configure b/gdb/configure
index c9a4b42ea1..adcfa49c63 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 3bec21560e..620ae23e34 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])
# ------------------------- #
next prev parent reply other threads:[~2020-07-27 11:48 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-29 18:27 Building today's snapshot of GDB with MinGW Eli Zaretskii
2020-06-29 20:36 ` Christian Biesinger
2020-06-30 14:09 ` Eli Zaretskii
2020-06-30 22:24 ` Simon Marchi
2020-07-01 15:09 ` Eli Zaretskii
2020-07-02 13:50 ` Eli Zaretskii
2020-07-02 14:25 ` Simon Marchi
2020-07-02 14:30 ` Simon Marchi
2020-07-02 17:47 ` Eli Zaretskii
2020-07-02 14:40 ` Pedro Alves
2020-07-02 17:46 ` Eli Zaretskii
2020-07-02 18:21 ` Pedro Alves
2020-07-02 18:33 ` Eli Zaretskii
2020-07-02 18:34 ` Pedro Alves
2020-07-01 15:20 ` Eli Zaretskii
2020-07-01 19:25 ` Christian Biesinger
2020-07-02 2:29 ` Eli Zaretskii
2020-07-02 10:18 ` Hannes Domani
2020-07-02 13:20 ` Eli Zaretskii
2020-07-06 10:39 ` Hannes Domani
2020-07-06 16:35 ` Eli Zaretskii
2020-07-01 19:25 ` Joel Brobecker
2020-07-02 13:46 ` Eli Zaretskii
2020-06-30 16:18 ` Eli Zaretskii
2020-06-30 18:21 ` Christian Biesinger
2020-06-30 18:28 ` Eli Zaretskii
2020-07-01 19:29 ` Joel Brobecker
2020-07-02 2:31 ` Eli Zaretskii
2020-07-01 19:30 ` Joel Brobecker
2020-07-02 13:39 ` Eli Zaretskii
2020-07-03 15:25 ` Joel Brobecker
2020-07-27 9:49 ` Tom de Vries
2020-07-27 10:05 ` Tom de Vries
2020-07-27 10:26 ` Tom de Vries
2020-07-27 11:48 ` Tom de Vries [this message]
2020-07-27 12:51 ` [committed][gdb/build] Fix typo sys/sockets.h -> sys/socket.h Joel Brobecker
2020-07-27 14:18 ` Building today's snapshot of GDB with MinGW Eli Zaretskii
2020-07-02 14:12 ` Eli Zaretskii
2020-07-03 15:08 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=06b2ef8b-9e00-5e61-1472-7fec02abcc1c@suse.de \
--to=tdevries@suse.de \
--cc=brobecker@adacore.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox