summaryrefslogtreecommitdiffstats
path: root/external/python3/i100492-freebsd.patch.1
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 16:51:28 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 16:51:28 +0000
commit940b4d1848e8c70ab7642901a68594e8016caffc (patch)
treeeb72f344ee6c3d9b80a7ecc079ea79e9fba8676d /external/python3/i100492-freebsd.patch.1
parentInitial commit. (diff)
downloadlibreoffice-940b4d1848e8c70ab7642901a68594e8016caffc.tar.xz
libreoffice-940b4d1848e8c70ab7642901a68594e8016caffc.zip
Adding upstream version 1:7.0.4.upstream/1%7.0.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'external/python3/i100492-freebsd.patch.1')
-rw-r--r--external/python3/i100492-freebsd.patch.135
1 files changed, 35 insertions, 0 deletions
diff --git a/external/python3/i100492-freebsd.patch.1 b/external/python3/i100492-freebsd.patch.1
new file mode 100644
index 000000000..074e5fc48
--- /dev/null
+++ b/external/python3/i100492-freebsd.patch.1
@@ -0,0 +1,35 @@
+FreeBSD porting fixes, patch by maho@openoffice.org
+
+--- Python-3.3.0/Python/thread_pthread.h 2012-11-28 09:00:41.097955124 +0000
++++ Python-3.3.0/Python/thread_pthread.h 2012-11-28 09:01:13.018329351 +0000
+@@ -186,6 +189,9 @@
+ {
+ pthread_t th;
+ int status;
++#ifdef __FreeBSD__
++ sigset_t set, oset;
++#endif
+ #if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
+ pthread_attr_t attrs;
+ #endif
+@@ -214,6 +220,10 @@
+ callback->func = func;
+ callback->arg = arg;
+
++#ifdef __FreeBSD__
++ sigfillset(&set);
++ SET_THREAD_SIGMASK(SIG_BLOCK, &set, &oset);
++#endif
+ status = pthread_create(&th,
+ #if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
+ &attrs,
+@@ -225,6 +234,9 @@
+ #endif
+ pythread_wrapper, callback);
+
++#ifdef __FreeBSD__
++ SET_THREAD_SIGMASK(SIG_SETMASK, &oset, NULL);
++#endif
+ #if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
+ pthread_attr_destroy(&attrs);
+ #endif