From ad2cc8f6a79499732225c239a3c988b95f6767be Mon Sep 17 00:00:00 2001 From: Alexis Murzeau Date: Thu, 7 Jan 2016 00:47:25 +0100 Subject: [PATCH] test,win: fix compilation with shared lib MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tests were failing to link because of undefined snprintf symbol with VS < 2015 and using shared library. snprintf is implemented in libuv in src/win/snprintf.c when compiling with VS < 2015, so this commit add src/win/snprintf.c to test sources to make snprintf available in tests. PR-URL: https://github.com/libuv/libuv/pull/678 Reviewed-By: Saúl Ibarra Corretgé --- uv.gyp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/uv.gyp b/uv.gyp index c3734ba3..4a044b28 100644 --- a/uv.gyp +++ b/uv.gyp @@ -418,7 +418,8 @@ [ 'OS=="win"', { 'sources': [ 'test/runner-win.c', - 'test/runner-win.h' + 'test/runner-win.h', + 'src/win/snprintf.c', ], 'libraries': [ '-lws2_32' ] }, { # POSIX @@ -486,6 +487,7 @@ 'sources': [ 'test/runner-win.c', 'test/runner-win.h', + 'src/win/snprintf.c', ], 'libraries': [ '-lws2_32' ] }, { # POSIX