Skip to content

Commit f8a96cf

Browse files
committed
fix(win32): resolve POSIX popen/pclose compatibility in C-dispatcher
Ensures the C-dispatcher compiles successfully on Windows/MSVC by mapping POSIX-standard pipe functions to their Win32 underscored counterparts. Changes: • Macro Aliasing: Added #ifdef _WIN32 guards to define popen as _popen and pclose as _pclose. • Toolchain Alignment: Fixes unresolved external symbol errors during the cl.exe link phase. Modified: • src/omnipkg/dispatcher.c (+4/-0 lines) [gitship-generated]
1 parent 7e5a49e commit f8a96cf

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/omnipkg/dispatcher.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,10 @@ static void winsock_init(void) {
198198
#include <stdio.h>
199199
#include <stdlib.h>
200200
#include <string.h>
201+
#ifdef _WIN32
202+
# define popen _popen
203+
# define pclose _pclose
204+
#endif
201205
#define MAX_PATH 4096
202206
#define MAX_VERSION 32
203207
#define MAX_JSON 65536 /* registry.json is tiny */

0 commit comments

Comments
 (0)