47 lines
1.8 KiB
Diff
47 lines
1.8 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index fcb8c928e..d283a6ed4 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -399,7 +399,7 @@ if(GCC OR CLANG)
|
|
set(C_CXX_FLAGS "${C_CXX_FLAGS} -Wno-deprecated-declarations")
|
|
else()
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wextra")
|
|
- set(C_CXX_FLAGS "${C_CXX_FLAGS} -Wall -fvisibility=hidden -fno-common")
|
|
+ set(C_CXX_FLAGS "${C_CXX_FLAGS} -Wall -fvisibility=hidden -fno-common -fms-extensions")
|
|
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Wno-newline-eof")
|
|
endif()
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow")
|
|
diff --git a/crypto/internal.h b/crypto/internal.h
|
|
index 4e42bb5b5..cb74fac23 100644
|
|
--- a/crypto/internal.h
|
|
+++ b/crypto/internal.h
|
|
@@ -141,7 +141,7 @@
|
|
#endif
|
|
|
|
#if defined(OPENSSL_THREADS) && \
|
|
- (!defined(OPENSSL_WINDOWS) || defined(__MINGW32__))
|
|
+ (!defined(OPENSSL_WINDOWS) || defined(__MINGW32__) && !defined(__clang__))
|
|
#include <pthread.h>
|
|
#define OPENSSL_PTHREADS
|
|
#endif
|
|
diff --git a/crypto/thread_win.c b/crypto/thread_win.c
|
|
index 9a1f8045e..0606e6db0 100644
|
|
--- a/crypto/thread_win.c
|
|
+++ b/crypto/thread_win.c
|
|
@@ -146,6 +146,7 @@ static void NTAPI thread_local_destructor(PVOID module, DWORD reason,
|
|
// optimization from discarding the variable.
|
|
//
|
|
// Note, in the prefixed build, |p_thread_callback_boringssl| may be a macro.
|
|
+#ifdef _MSC_VER
|
|
#define STRINGIFY(x) #x
|
|
#define EXPAND_AND_STRINGIFY(x) STRINGIFY(x)
|
|
#ifdef _WIN64
|
|
@@ -157,6 +158,7 @@ __pragma(comment(linker, "/INCLUDE:__tls_used"))
|
|
__pragma(comment(
|
|
linker, "/INCLUDE:_" EXPAND_AND_STRINGIFY(p_thread_callback_boringssl)))
|
|
#endif
|
|
+#endif
|
|
|
|
// .CRT$XLA to .CRT$XLZ is an array of PIMAGE_TLS_CALLBACK pointers that are
|
|
// called automatically by the OS loader code (not the CRT) when the module is
|