From 77f518403f6eb12a2df620ebff61fa230445eab3 Mon Sep 17 00:00:00 2001 From: Sharat M R Date: Mon, 27 Apr 2015 05:25:33 +0530 Subject: [PATCH] win,node-gyp: make delay-load hook C89 compliant This fixes building compiled addons with Visual Studio 2010. PR-URL: https://github.com/TooTallNate/node-gyp/pull/616 Reviewed-By: Bert Belder --- deps/npm/node_modules/node-gyp/src/win_delay_load_hook.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deps/npm/node_modules/node-gyp/src/win_delay_load_hook.c b/deps/npm/node_modules/node-gyp/src/win_delay_load_hook.c index 05c4c398873af0..f397cfa195e448 100644 --- a/deps/npm/node_modules/node-gyp/src/win_delay_load_hook.c +++ b/deps/npm/node_modules/node-gyp/src/win_delay_load_hook.c @@ -16,6 +16,7 @@ #include static FARPROC WINAPI load_exe_hook(unsigned int event, DelayLoadInfo* info) { + HMODULE m; if (event != dliNotePreLoadLibrary) return NULL; @@ -23,7 +24,7 @@ static FARPROC WINAPI load_exe_hook(unsigned int event, DelayLoadInfo* info) { _stricmp(info->szDll, "node.exe") != 0) return NULL; - HMODULE m = GetModuleHandle(NULL); + m = GetModuleHandle(NULL); return (FARPROC) m; }