fix: guard O_SYNC flag with ifdef and add mingw32 libuv link libs
Guard the O_SYNC flag usage in mapFileFlags() with a preprocessor conditional to fix compilation on Windows where this constant is not defined. Additionally, add the required Windows socket and system libraries (ws2_32, iphlpapi, psapi, userenv) to LIBUV_LIBS when building under mingw32, replacing the Linux-specific pthread and rt libraries.
This commit is contained in:
@@ -103,9 +103,13 @@ else
|
||||
SHARED_LIB_FLAGS := -Wl,-soname,$@.so
|
||||
SHARED_EXT := so
|
||||
|
||||
ifeq ($(OS),mingw32)
|
||||
LIBUV_LIBS := -lws2_32 -liphlpapi -lpsapi -luserenv
|
||||
else
|
||||
# On Linux we need to explicitly link to these for libuv.
|
||||
LIBUV_LIBS := -lpthread -lrt
|
||||
endif
|
||||
endif
|
||||
|
||||
CFLAGS := $(C_OPTIONS) $(C_WARNINGS)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user