{"thread":{"id":"32799","subject":"[PATCH 2/5] msvc: git-daemon: Fix linker \"unresolved external\" errors","startedAt":"2013-01-31T18:30:14Z","lastAt":"2013-01-31T18:30:14Z","messageCount":1,"participants":["Ramsay Jones"],"isPatch":true,"patchVersion":1,"patchTotal":5},"messages":[{"id":"208384","messageId":"510AB836.5090209@ramsay1.demon.co.uk","threadId":"32799","inReplyTo":null,"subject":"[PATCH 2/5] msvc: git-daemon: Fix linker \"unresolved external\" errors","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2013-01-31T18:30:14Z","receivedAt":"2013-01-31T18:30:14Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nIn particular, while linking git-daemon.exe, the linker complains\nthat the external symbols _inet_pton and _inet_ntop are unresolved.\nCommit a666b472 (\"daemon: opt-out on features that require posix\",\n04-11-2010) addressed this problem for MinGW by configuring the\nuse of the internal 'compat' versions of these function.\n\nAlthough the MSVC header <WS2tcpip.h> contains the prototypes for\nthe inet_pton and inet_ntop functions, they are only visible for\nWindows API versions from 0x0600 (Windows Vista) or later. (In\naddition, on Windows XP, ws2_32.dll does not export these symbols).\n\nIn order to fix the linker errors, we also configure the MSVC build\nto use the internal compat versions of these functions by setting\nthe NO_INET_{PTON,NTOP} build variables.\n\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n config.mak.uname | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex bea34f0..7e52f3c 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -344,6 +344,8 @@ ifeq ($(uname_S),Windows)\n \tNO_CURL = YesPlease\n \tNO_PYTHON = YesPlease\n \tBLK_SHA1 = YesPlease\n+\tNO_INET_PTON = YesPlease\n+\tNO_INET_NTOP = YesPlease\n \tNO_POSIX_GOODIES = UnfortunatelyYes\n \tNATIVE_CRLF = YesPlease\n \tDEFAULT_HELP_FORMAT = html\n-- \n1.8.1\n"}]}