From 5f797147fb44cc0b7d7b91d66cfeae4abf696b50 Mon Sep 17 00:00:00 2001 From: jsteube Date: Sat, 1 Sep 2018 14:09:24 +0200 Subject: [PATCH] Link ws2_32 in order to make use of select() --- include/shared.h | 6 ++++++ src/Makefile | 3 +++ 2 files changed, 9 insertions(+) diff --git a/include/shared.h b/include/shared.h index 5d9a497ee..852c48342 100644 --- a/include/shared.h +++ b/include/shared.h @@ -15,6 +15,12 @@ #include #include +#if defined (_WIN) +#include // needed for select() +#else +#include +#endif + bool overflow_check_u32_add (const u32 a, const u32 b); bool overflow_check_u32_mul (const u32 a, const u32 b); bool overflow_check_u64_add (const u64 a, const u64 b); diff --git a/src/Makefile b/src/Makefile index a023733c0..1a870cb54 100644 --- a/src/Makefile +++ b/src/Makefile @@ -262,6 +262,7 @@ LFLAGS_NATIVE := $(LFLAGS) LFLAGS_NATIVE += -Wl,--dynamicbase -Wl,--nxcompat LFLAGS_NATIVE += -lpsapi LFLAGS_NATIVE += -liconv +LFLAGS_NATIVE += -lws2_32 endif # MSYS2 ## @@ -299,9 +300,11 @@ LFLAGS_CROSS_LINUX64 += -lm LFLAGS_CROSS_WIN32 := $(LFLAGS) LFLAGS_CROSS_WIN32 += -Wl,--dynamicbase -Wl,--nxcompat LFLAGS_CROSS_WIN32 += -lpsapi +LFLAGS_CROSS_WIN32 += -lws2_32 LFLAGS_CROSS_WIN64 := $(LFLAGS) LFLAGS_CROSS_WIN64 += -Wl,--dynamicbase -Wl,--nxcompat LFLAGS_CROSS_WIN64 += -lpsapi +LFLAGS_CROSS_WIN64 += -lws2_32 CFLAGS_REMOVE_LZMA := -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef