Skip to content

Commit 4ab7527

Browse files
Ramsay Jonesgitster
authored andcommitted
msvc: git-daemon: Fix linker "unresolved external" errors
In particular, while linking git-daemon.exe, the linker complains that the external symbols _inet_pton and _inet_ntop are unresolved. Commit a666b47 ("daemon: opt-out on features that require posix", 04-11-2010) addressed this problem for MinGW by configuring the use of the internal 'compat' versions of these function. Although the MSVC header <WS2tcpip.h> contains the prototypes for the inet_pton and inet_ntop functions, they are only visible for Windows API versions from 0x0600 (Windows Vista) or later. (In addition, on Windows XP, ws2_32.dll does not export these symbols). In order to fix the linker errors, we also configure the MSVC build to use the internal compat versions of these functions by setting the NO_INET_{PTON,NTOP} build variables. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Tested-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 41f2999 commit 4ab7527

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

config.mak.uname

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,8 @@ ifeq ($(uname_S),Windows)
344344
NO_CURL = YesPlease
345345
NO_PYTHON = YesPlease
346346
BLK_SHA1 = YesPlease
347+
NO_INET_PTON = YesPlease
348+
NO_INET_NTOP = YesPlease
347349
NO_POSIX_GOODIES = UnfortunatelyYes
348350
NATIVE_CRLF = YesPlease
349351
DEFAULT_HELP_FORMAT = html

0 commit comments

Comments
 (0)