external/firebird/UnpackedTarball_firebird.mk     |    6 ++++++
 external/firebird/firebird-macosx-sandbox.patch.1 |   13 +++++++++++++
 2 files changed, 19 insertions(+)

New commits:
commit 9d6159e86f32cc1fa96724e031d02ffaadd60337
Author:     Tor Lillqvist <t...@iki.fi>
AuthorDate: Fri Feb 19 20:11:30 2021 +0200
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Tue Feb 23 15:14:21 2021 +0100

    tdf#140332: Can't use System V semaphores in a sandboxed macOS process
    
    See
    
https://developer.apple.com/library/archive/documentation/Security/Conceptual/AppSandboxDesignGuide/AppSandboxInDepth/AppSandboxInDepth.html
    , "Note: System V semaphores are not supported in sandboxed apps".
    
    So use POSIX semaphores instead.
    
    Change-Id: I37c910cf13b868ab15fe31f90e42d24a9a24eeb1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111239
    Tested-by: Tor Lillqvist <t...@collabora.com>
    Reviewed-by: Tor Lillqvist <t...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111256
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Jenkins

diff --git a/external/firebird/UnpackedTarball_firebird.mk 
b/external/firebird/UnpackedTarball_firebird.mk
index 25b1640755a1..196895ff757c 100644
--- a/external/firebird/UnpackedTarball_firebird.mk
+++ b/external/firebird/UnpackedTarball_firebird.mk
@@ -56,6 +56,12 @@ $(eval $(call gb_UnpackedTarball_add_patches,firebird,\
 ))
 endif
 
+ifeq ($(ENABLE_MACOSX_SANDBOX),TRUE)
+$(eval $(call gb_UnpackedTarball_add_patches,firebird,\
+       external/firebird/firebird-macosx-sandbox.patch.1 \
+))
+endif
+
 ifneq ($(filter -fsanitize=%,$(CC)),)
 $(eval $(call gb_UnpackedTarball_add_patches,firebird, \
     external/firebird/sanitizer.patch \
diff --git a/external/firebird/firebird-macosx-sandbox.patch.1 
b/external/firebird/firebird-macosx-sandbox.patch.1
new file mode 100644
index 000000000000..3bf246c682ba
--- /dev/null
+++ b/external/firebird/firebird-macosx-sandbox.patch.1
@@ -0,0 +1,13 @@
+-*- Mode: Diff -*-
+
+--- firebird/src/common/isc_s_proto.h
++++ firebird/src/common/isc_s_proto.h
+@@ -37,6 +37,8 @@
+ // Firebird platform-specific synchronization data structures
+ 
+ #if defined(DARWIN)
++#define USE_POSIX_SEMAPHORE
++#define USE_SHARED_FUTEX
+ #define USE_FILELOCKS
+ #endif
+ 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to