gentoo-ebuilds/dev-cpp/folly/files/folly-2023.05.22.00-musl-fix.patch
Sam James 8fc7984e0f
dev-cpp/folly: add 2023.05.22.00
Signed-off-by: Sam James <sam@gentoo.org>
2023-06-02 13:40:33 +01:00

26 lines
895 B
Diff

# Elf.cpp expects __ELF_NATIVE_CLASS to be defined at least for platforms
# besides FreeBSD-based ones, and so it defines FOLLY_ELF_NATIVE_CLASS with it.
# Without __ELF_NATIVE_CLASS (and apparently musl does not define it),
# FOLLY_ELF_NATIVE_CLASS is also not defined so what was supposed to be
# expanded to ELFCLASS32 or ELFCLASS64 ends up being
# ELFCLASSFOLLY_ELF_NATIVE_CLASS.
#
# Please refer: https://github.com/facebook/folly/issues/1478
#
# Closes: https://bugs.gentoo.org/835744
--- a/folly/experimental/symbolizer/Elf.cpp
+++ b/folly/experimental/symbolizer/Elf.cpp
@@ -39,12 +39,10 @@
#if defined(__ELF_NATIVE_CLASS)
#define FOLLY_ELF_NATIVE_CLASS __ELF_NATIVE_CLASS
-#elif defined(__FreeBSD__)
-#if defined(__LP64__)
+#elif defined(__LP64__)
#define FOLLY_ELF_NATIVE_CLASS 64
#else
#define FOLLY_ELF_NATIVE_CLASS 32
-#endif
#endif // __ELF_NATIVE_CLASS
namespace folly {