From 0477db37ca5561baf0249458e9e3e3310514244f Mon Sep 17 00:00:00 2001 From: Rick V Date: Fri, 24 Aug 2018 23:08:39 -0500 Subject: [PATCH] wow64 cross compile setup --- CMakeLists.txt | 6 ++++++ llarp/win32_inet.c | 3 +++ 2 files changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index b8c36d0f8..b9d5e8689 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,6 +49,12 @@ else() set(THREAD_LIB pthread) endif() +if(WOW64_CROSS_COMPILE) +find_library(PSEH_LIB pseh) +set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} ${PSEH_LIB}") +set(CMAKE_C_STANDARD_LIBRARIES "${CMAKE_C_STANDARD_LIBRARIES} ${PSEH_LIB}") +endif() + else() option (BUILD_AVX2 "Enable AVX2 FPU vector instructions." OFF) if (BUILD_AVX2) diff --git a/llarp/win32_inet.c b/llarp/win32_inet.c index 06f8dfe19..e8c57685d 100644 --- a/llarp/win32_inet.c +++ b/llarp/win32_inet.c @@ -13,6 +13,9 @@ #include #include #include +#if WINNT_CROSS_COMPILE && !NTSTATUS +typedef LONG NTSTATUS; +#endif #include "win32_intrnl.h" const char *