aboutsummaryrefslogtreecommitdiffstats
path: root/main/boost1.80/aligned-alloc.patch
blob: 8d168ee6bd1e82a2e3c8e44de55f630adf49f0da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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