]> git.ipfire.org Git - thirdparty/git.git/commitdiff
win32: fix building with NO_UNIX_SOCKETS
authorMike Hommey <mh@glandium.org>
Fri, 3 May 2024 09:14:27 +0000 (18:14 +0900)
committerJunio C Hamano <gitster@pobox.com>
Fri, 3 May 2024 15:42:50 +0000 (08:42 -0700)
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>
compat/mingw.c

index 4876344b5b8009794eb9cefcbff342b1cc4f90a2..6b06ea540fdb7ac5d425ba46eac5abbce2fc46e3 100644 (file)
@@ -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