From 3e772da057283afce3972a0008020d3594d5b881 Mon Sep 17 00:00:00 2001 From: Robert Konrad Date: Tue, 24 Sep 2024 21:41:15 +0200 Subject: [PATCH] ifdef new Windows specific code --- src/node_os.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/node_os.cc b/src/node_os.cc index 5fbcacf3f0..d8735d3311 100644 --- a/src/node_os.cc +++ b/src/node_os.cc @@ -277,7 +277,7 @@ static void GetWindowsSDKs(const FunctionCallbackInfo& args) { #endif } - +#ifdef _WIN32 static PROCESS_INFORMATION processInfo = {}; static struct ods_buffer_type @@ -350,9 +350,11 @@ void execute_sync(const char* command, const char* directory) { startupInfo.cb = sizeof(startupInfo); CreateProcessA(NULL, (char*)command, NULL, NULL, FALSE, CREATE_DEFAULT_ERROR_MODE, NULL, directory, &startupInfo, &processInfo); } +#endif void RunProcess(const FunctionCallbackInfo& args) { +#ifdef _WIN32 CHECK_EQ(args.Length(), 2); CHECK(args[0]->IsString()); CHECK(args[1]->IsString()); @@ -369,6 +371,7 @@ void RunProcess(const FunctionCallbackInfo& args) WaitForSingleObject(processInfo.hProcess, INFINITE); CloseHandle(processInfo.hProcess); CloseHandle(processInfo.hThread); +#endif }