Skip to content

Commit 111afda

Browse files
committed
chore: fix
1 parent 63a86c4 commit 111afda

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

setup.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,11 +296,16 @@ def get_library_paths():
296296
print(f" nghttp2 lib: {LIB_PATHS['nghttp2_lib']}")
297297
print()
298298

299-
# Platform-specific compile args for extensions
299+
# Platform-specific compile args and libraries for extensions
300300
if IS_WINDOWS:
301301
EXT_COMPILE_ARGS = ["/O2", "/DHAVE_NGHTTP2"]
302+
# vcpkg library names on Windows (without .lib extension)
303+
# Links to: libssl.lib, libcrypto.lib, nghttp2.lib, zlib.lib
304+
EXT_LIBRARIES = ["libssl", "libcrypto", "nghttp2", "zlib"]
302305
else:
303306
EXT_COMPILE_ARGS = ["-std=c11", "-O2", "-DHAVE_NGHTTP2"]
307+
# Unix library names
308+
EXT_LIBRARIES = ["ssl", "crypto", "nghttp2", "z"]
304309

305310
# Define C extension modules
306311
extensions = [
@@ -324,7 +329,7 @@ def get_library_paths():
324329
LIB_PATHS["openssl_lib"],
325330
LIB_PATHS["nghttp2_lib"],
326331
],
327-
libraries=["ssl", "crypto", "nghttp2", "z"],
332+
libraries=EXT_LIBRARIES,
328333
extra_compile_args=EXT_COMPILE_ARGS,
329334
language="c",
330335
),
@@ -344,7 +349,7 @@ def get_library_paths():
344349
LIB_PATHS["openssl_lib"],
345350
LIB_PATHS["nghttp2_lib"],
346351
],
347-
libraries=["ssl", "crypto", "nghttp2", "z"],
352+
libraries=EXT_LIBRARIES,
348353
extra_compile_args=EXT_COMPILE_ARGS if IS_WINDOWS else ["-std=c11", "-O2"],
349354
language="c",
350355
),

src/core/httpmorph.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <ws2tcpip.h>
2929
#include <windows.h>
3030
#define strcasecmp _stricmp
31+
#define strdup _strdup
3132
#define close closesocket
3233
#define ssize_t SSIZE_T
3334
#pragma comment(lib, "ws2_32.lib")

0 commit comments

Comments
 (0)