Commit dc06d2bc authored by Jerome Dias's avatar Jerome Dias
Browse files

[fix] Add patch to keep _POSIX_THREADS value.

In UNIX platform since python 3.7, _POSIX_THREADS need to be defined. If
it's not the case the native threads type is unknown and a build error
is returned from pythread.h.
parent 3deb0927
From 1ccbae62bb5e704c61462d8ce49b43fa6ad0badd Mon Sep 17 00:00:00 2001
From: Jerome Dias <jerome.dias@kitware.com>
Date: Mon, 26 Oct 2020 16:24:44 +0100
Subject: [PATCH] [fix] disable _POSIX_THREADS unset.
In unix platform since python 3.7, _POSIX_THREADS need to be defined. If
it's not the case the native threads type is unknown and a build error
is returned in pythread.h.
---
src/PythonQtPythonInclude.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PythonQtPythonInclude.h b/src/PythonQtPythonInclude.h
index be8d0e0..dc9c7f1 100644
--- a/src/PythonQtPythonInclude.h
+++ b/src/PythonQtPythonInclude.h
@@ -35,7 +35,7 @@
// Undefine macros that Python.h defines to avoid redefinition warning.
#undef _POSIX_C_SOURCE
-#undef _POSIX_THREADS
+// #undef _POSIX_THREADS
#undef _XOPEN_SOURCE
// Undefine Qt keywords that conflict with Python headers
--
2.17.1
......@@ -12,3 +12,7 @@ superbuild_add_project(pythonqt
# platforms.
-DMACOSX_APP_INSTALL_PREFIX:PATH=<INSTALL_DIR>/Applications
)
if (UNIX)
superbuild_apply_patch(pythonqt fix-native-threads "Disable _PTHREAD unset to get native threads type.")
endif ()
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment