summaryrefslogtreecommitdiffstats
path: root/compat/mingw.c
diff options
context:
space:
mode:
authorMike Hommey <mh@glandium.org>2024-05-03 11:14:27 +0200
committerJunio C Hamano <gitster@pobox.com>2024-05-03 17:42:50 +0200
commit395c130fd80f22e213d6dd56c2b14fa653d5ffda (patch)
treece383c7c57b2d4e676a998ad789fd7c8fe186c76 /compat/mingw.c
parentWin32: detect unix socket support at runtime (diff)
downloadgit-395c130fd80f22e213d6dd56c2b14fa653d5ffda.tar.xz
git-395c130fd80f22e213d6dd56c2b14fa653d5ffda.zip
win32: fix building with NO_UNIX_SOCKETS
After 2406bf5f (Win32: detect unix socket support at runtime, 2024-04-03), it fails with: compat/mingw.c:4160:5: error: no previous prototype for function 'mingw_have_unix_sockets' [-Werror,-Wmissing-prototypes] 4160 | int mingw_have_unix_sockets(void) | ^ because the prototype is behind `ifndef NO_UNIX_SOCKETS`. Signed-off-by: Mike Hommey <mh@glandium.org> Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat/mingw.c')
-rw-r--r--compat/mingw.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/compat/mingw.c b/compat/mingw.c
index 4876344b5b..6b06ea540f 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -3159,6 +3159,7 @@ int uname(struct utsname *buf)
return 0;
}
+#ifndef NO_UNIX_SOCKETS
int mingw_have_unix_sockets(void)
{
SC_HANDLE scm, srvc;
@@ -3177,3 +3178,4 @@ int mingw_have_unix_sockets(void)
}
return ret;
}
+#endif