Skip to content

Commit 395c130

Browse files
glandiumgitster
authored andcommitted
win32: fix building with NO_UNIX_SOCKETS
After 2406bf5 (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 <[email protected]> Acked-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2406bf5 commit 395c130

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compat/mingw.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3159,6 +3159,7 @@ int uname(struct utsname *buf)
31593159
return 0;
31603160
}
31613161

3162+
#ifndef NO_UNIX_SOCKETS
31623163
int mingw_have_unix_sockets(void)
31633164
{
31643165
SC_HANDLE scm, srvc;
@@ -3177,3 +3178,4 @@ int mingw_have_unix_sockets(void)
31773178
}
31783179
return ret;
31793180
}
3181+
#endif

0 commit comments

Comments
 (0)