aboutsummaryrefslogtreecommitdiffstats
path: root/main/boost1.80/aligned-alloc.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/boost1.80/aligned-alloc.patch')
-rw-r--r--main/boost1.80/aligned-alloc.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/main/boost1.80/aligned-alloc.patch b/main/boost1.80/aligned-alloc.patch
new file mode 100644
index 0000000000..8d168ee6bd
--- /dev/null
+++ b/main/boost1.80/aligned-alloc.patch
@@ -0,0 +1,28 @@
+Patch-Source: https://github.com/chimera-linux/cports/blob/1dd1fed225a0b65b5164bc5168194f85deea3b19/main/boost1.80/patches/aligned_alloc.patch
+commit 98ca73bfe3f574ba72232013919885bdae679e09
+Author: Daniel Kolesa <daniel@octaforge.org>
+Date: Fri Sep 23 03:55:45 2022 +0200
+
+ use posix as a fallback for aligned_alloc
+
+ Testing for feature test macros is a broken antipattern, and
+ fucks up in ugly ways under musl. Since we don't really care
+ for having a non-POSIX fallback, always use the POSIX code
+ unless forced.
+
+diff --git a/boost/align/aligned_alloc.hpp b/boost/align/aligned_alloc.hpp
+index 1d81a13..f2b5137 100644
+--- a/boost/align/aligned_alloc.hpp
++++ b/boost/align/aligned_alloc.hpp
+@@ -38,10 +38,8 @@ Distributed under the Boost Software License, Version 1.0.
+ #include <boost/align/detail/aligned_alloc_posix.hpp>
+ #elif defined(sun) || defined(__sun)
+ #include <boost/align/detail/aligned_alloc_sunos.hpp>
+-#elif (_POSIX_C_SOURCE >= 200112L) || (_XOPEN_SOURCE >= 600)
+-#include <boost/align/detail/aligned_alloc_posix.hpp>
+ #else
+-#include <boost/align/detail/aligned_alloc.hpp>
++#include <boost/align/detail/aligned_alloc_posix.hpp>
+ #endif
+
+ #endif