Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Orgad Shaneh <orgads@gmail.com>
To: gdb-patches@sourceware.org
Subject: [PATCH] mingw: Fix wrong error message on connection timeout
Date: Sun, 17 Nov 2019 10:46:00 -0000	[thread overview]
Message-ID: <CAGHpTBJf7rkWKVvmqAFemhu+aqT9CTVE7bYp1__Yo+5F-R=87w@mail.gmail.com> (raw)

ETIMEDOUT is defined as 138. Translating this error code to a
readable message gives "The system tried to join a drive to a directory
on a joined drive."

Since GDB assigns this value directly, it should use a value that
the system recognizes correctly.
---
 gdb/ser-tcp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/gdb/ser-tcp.c b/gdb/ser-tcp.c
index 37f64b5d08..a1baa7729e 100644
--- a/gdb/ser-tcp.c
+++ b/gdb/ser-tcp.c
@@ -40,9 +40,8 @@

 #ifdef USE_WIN32API
 #include <ws2tcpip.h>
-#ifndef ETIMEDOUT
+#undef ETIMEDOUT
 #define ETIMEDOUT WSAETIMEDOUT
-#endif
 /* Gnulib defines close too, but gnulib's replacement
    doesn't call closesocket unless we import the
    socketlib module.  */
--
2.24.0.windows.1.2.g59df941196


             reply	other threads:[~2019-11-17 10:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-17 10:46 Orgad Shaneh [this message]
2019-11-17 19:47 ` Simon Marchi

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='CAGHpTBJf7rkWKVvmqAFemhu+aqT9CTVE7bYp1__Yo+5F-R=87w@mail.gmail.com' \
    --to=orgads@gmail.com \
    --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