Skip to content

Commit

Permalink
win32: fix building with NO_UNIX_SOCKETS
Browse files Browse the repository at this point in the history
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 <mh@glandium.org>
Acked-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
glandium authored and gitster committed May 3, 2024
1 parent 2406bf5 commit 395c130
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compat/mingw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -3177,3 +3178,4 @@ int mingw_have_unix_sockets(void)
}
return ret;
}
#endif

0 comments on commit 395c130

Please sign in to comment.