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>
Mike Hommey committed
May 3, 2024 at 18:14 UTC
395c130fd80f22e213d6dd56c2b14fa653d5ffda
1 file changed
+2
compat/mingw.c
+2
@@ -3159,6 +3159,7 @@ int uname(struct utsname *buf)
3159
return 0;
3160
}
3161
3162
+#ifndef NO_UNIX_SOCKETS
3163
int mingw_have_unix_sockets(void)
3164
{
3165
SC_HANDLE scm, srvc;
@@ -3177,3 +3178,4 @@ int mingw_have_unix_sockets(void)
3178
}
3179
return ret;
3180
}
3181
+#endif