5b1be772c7
The previous patch does not work; I could reproduce that libtorrent was still using the wrong stuff on my system and segfaulting. Even if it did work, it would be fragile, since there is no guarantee features.h will define _XOPEN_SOURCE (e.g. defining _BSD_SOURCE or _DEFAULT_SOURCE will disable the lines that define it). Therefore, stop trying to be clever and simply make POSIX the fallback behavior. It would be okay to drop all the system specific logic too, since our boost build is for a single target, but those are harmless and would just make for an unnecessarily bigger patch.
27 lines
1 KiB
Diff
27 lines
1 KiB
Diff
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
|