git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 ew/daemon-socket-keepalive] Windows: add missing definition of ENOTSOCK

From
Johannes Sixt <j6t@kdbg.org>
Date
Jul 23, 2016, 08:39 UTC
Message-ID
<4ca7ee51-351b-d222-d05a-63c5bdc5c383@kdbg.org>
In-Reply-To
<alpine.DEB.2.20.1607230957320.14111@virtualbox>

The previous commit introduced the first use of ENOTSOCK. This macro is not available on Windows. Define it as WSAENOTSOCK because that is the corresponding error value reported by the Windows versions of socket functions.

For details, see https://msdn.microsoft.com/en-us/library/windows/desktop/ms740476.aspx

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
 Same patch text, but the commit message is amended, just in case it's
 easier for you to apply a new patch than to amend a queued one.
 Thanks everybody.
 compat/mingw.h | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/compat/mingw.h b/compat/mingw.h
index 233933e..95e128f 100644
--- a/compat/mingw.h
+++ b/compat/mingw.h
@@ -73,6 +73,9 @@ typedef int pid_t;
 #ifndef ECONNABORTED
 #define ECONNABORTED WSAECONNABORTED
 #endif
+#ifndef ENOTSOCK
+#define ENOTSOCK WSAENOTSOCK
+#endif

 struct passwd {
     char *pw_name;
-- 
2.9.0.443.ga8520ad
Previous: Johannes SchindelinNext: Eric Wong
Message 5 of 6 in “Windows: add missing definition of ENOTSOCK”
  1. Windows: add missing definition of ENOTSOCKJohannes Sixt, Jul 21, 2016
  2. Johannes SchindelinJul 22, 2016
  3. Junio C HamanoJul 22, 2016
  4. Johannes SchindelinJul 23, 2016
  5. Windows: add missing definition of ENOTSOCKJohannes Sixt, Jul 23, 2016
  6. Eric WongJul 22, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.