From dba8d811fddcb45468350a863f4b12af4fa36962 Mon Sep 17 00:00:00 2001 From: Self Not Found Date: Mon, 6 Mar 2023 22:02:33 +0800 Subject: [PATCH] Link ws2_32 --- client/CMakeLists.txt | 3 +++ client/Makefile | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 0bd8bd5cc..894af00e7 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt @@ -584,6 +584,9 @@ if (MINGW) set(CMAKE_C_FLAGS "-mno-ms-bitfields -fexec-charset=cp850 ${CMAKE_C_FLAGS}") set(CMAKE_CXX_FLAGS "-mno-ms-bitfields -fexec-charset=cp850 ${CMAKE_CXX_FLAGS}") + + # link Winsock2 + set(ADDITIONAL_LNK ws2_32 ${ADDITIONAL_LNK}) endif (MINGW) target_include_directories(proxmark3 PRIVATE diff --git a/client/Makefile b/client/Makefile index b08eb0acb..d0cee355e 100644 --- a/client/Makefile +++ b/client/Makefile @@ -93,7 +93,6 @@ LUALIBLD = LUAPLATFORM = generic ifneq (,$(findstring MINGW,$(platform))) LUAPLATFORM = mingw - LDLIBS += -lws2_32 else ifeq ($(platform),Darwin) LUAPLATFORM = macosx @@ -103,6 +102,11 @@ else endif endif +## Winsock2 +ifneq (,$(findstring MINGW,$(platform))) + LDLIBS += -lws2_32 +endif + ## Reveng REVENGLIBPATH = ./deps/reveng REVENGLIBINC = -I$(REVENGLIBPATH)