diff mbox series

[v3,3/3] git-compat-util: include declaration for unix sockets in windows

Message ID 20210914072600.11552-4-carenas@gmail.com (mailing list archive)
State Accepted
Commit bb390b1f49406d967e8bf3401337cf1d9535f820
Headers show
Series windows: allow building without NO_UNIX_SOCKETS | expand

Commit Message

Carlo Marcelo Arenas Belón Sept. 14, 2021, 7:26 a.m. UTC
Available since Windows 10 release 1803 and Windows Server 2019.

NO_UNIX_SOCKETS is still the default for Windows builds, as they need
to keep backward compatibility with releases up to Windows 7, but allow
including the header otherwise.

Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
---
v3:
* better commit message as suggested by Dscho

 git-compat-util.h | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/git-compat-util.h b/git-compat-util.h
index b46605300a..6a420d104c 100644
--- a/git-compat-util.h
+++ b/git-compat-util.h
@@ -160,6 +160,9 @@ 
 # endif
 #define WIN32_LEAN_AND_MEAN  /* stops windows.h including winsock.h */
 #include <winsock2.h>
+#ifndef NO_UNIX_SOCKETS
+#include <afunix.h>
+#endif
 #include <windows.h>
 #define GIT_WINDOWS_NATIVE
 #endif