diff options
author | Mikael Urankar <mikael@FreeBSD.org> | 2022-08-19 09:13:16 +0000 |
---|---|---|
committer | Mikael Urankar <mikael@FreeBSD.org> | 2022-08-19 09:55:16 +0000 |
commit | 0b0b0bad03a8cd5e802bf3a64f7d2331aba52e7f (patch) | |
tree | 04bbd66e9ae21b742c20ed83d00dd7147d3baeb5 /net-im/libsignal-node | |
parent | 8fed13ffe12b11a571e3669440c5fe53d34551a3 (diff) | |
download | ports-0b0b0bad03a8cd5e802bf3a64f7d2331aba52e7f.tar.gz ports-0b0b0bad03a8cd5e802bf3a64f7d2331aba52e7f.zip |
net-im/libsignal-node: Fix build on FreeBSD 12.x and 13.x
Limit _XOPEN_SOURCE to Linux as it breaks FreeBSD build.
This is an import of an upstream patch:
https://github.com/google/boringssl/commit/387f82054c8ffa7d2b9e31d908586fbd47f34039
Diffstat (limited to 'net-im/libsignal-node')
-rw-r--r-- | net-im/libsignal-node/files/patch-limit_XOPEN_SOURCE_to_Linux | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/net-im/libsignal-node/files/patch-limit_XOPEN_SOURCE_to_Linux b/net-im/libsignal-node/files/patch-limit_XOPEN_SOURCE_to_Linux new file mode 100644 index 000000000000..a9f0dc35014b --- /dev/null +++ b/net-im/libsignal-node/files/patch-limit_XOPEN_SOURCE_to_Linux @@ -0,0 +1,31 @@ +https://github.com/google/boringssl/commit/387f82054c8ffa7d2b9e31d908586fbd47f34039 + +Limit _XOPEN_SOURCE to Linux. + +POSIX feature macros are a mess. Reportedly, FreeBSD also breaks with +_XOPEN_SOURCE, so try leaving it unset by default. + +Update-Note: It's possible this will break yet another obscure UNIX. +Hopefully we can eventually find a combination that works? + +Bug: 471 +Change-Id: I103f8093110d343789b9c5a22eb056ab78d9cd14 +Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/51145 +Reviewed-by: Adam Langley <agl@google.com> + + +--- ../boring-e1c719c0964ba37e6935355e9bf19821b072797e/boring-sys/deps/boringssl/CMakeLists.txt.orig 2022-08-19 10:54:32.212105000 +0200 ++++ ../boring-e1c719c0964ba37e6935355e9bf19821b072797e/boring-sys/deps/boringssl/CMakeLists.txt 2022-08-19 10:55:12.577991000 +0200 +@@ -21,8 +21,11 @@ endif() + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -fno-common -std=c11") + endif() + +-# pthread_rwlock_t requires a feature flag. +-if(NOT WIN32) ++# pthread_rwlock_t on Linux requires a feature flag. We limit this to Linux ++# because, on Apple platforms, it instead disables APIs we use. See compat(5) ++# and sys/cdefs.h. Reportedly, FreeBSD also breaks when this is set. See ++# https://crbug.com/boringssl/471. ++if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_XOPEN_SOURCE=700") + endif() |