1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-21 18:25:41 +03:00
aports/community/py3-numpy/numpy-1.17.0-musl.patch
2022-09-19 15:17:28 +02:00

41 lines
1.6 KiB
Diff

Upstream: No
Reason: Enable build on endian musl
diff --git a/numpy/core/include/numpy/npy_endian.h b/numpy/core/include/numpy/npy_endian.h
index 5e58a7f..19e5e64 100644
--- a/numpy/core/include/numpy/npy_endian.h
+++ b/numpy/core/include/numpy/npy_endian.h
@@ -12,7 +12,7 @@
#if defined(NPY_HAVE_ENDIAN_H)
#include <endian.h>
#elif defined(NPY_HAVE_SYS_ENDIAN_H)
- #include <sys/endian.h>
+ #include <bsd/sys/endian.h>
#endif
#if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && defined(LITTLE_ENDIAN)
diff --git a/numpy/core/setup.py b/numpy/core/setup.py
index 52b51e4..73f3b05 100644
--- a/numpy/core/setup.py
+++ b/numpy/core/setup.py
@@ -355,7 +355,7 @@ def check_types(config_cmd, ext, build_dir):
if res:
private_defines.append(('HAVE_ENDIAN_H', 1))
public_defines.append(('NPY_HAVE_ENDIAN_H', 1))
- res = config_cmd.check_header("sys/endian.h")
+ res = config_cmd.check_header("bsd/sys/endian.h")
if res:
private_defines.append(('HAVE_SYS_ENDIAN_H', 1))
public_defines.append(('NPY_HAVE_SYS_ENDIAN_H', 1))
diff --git a/numpy/core/setup_common.py b/numpy/core/setup_common.py
index ce966dd..2a144fd 100644
--- a/numpy/core/setup_common.py
+++ b/numpy/core/setup_common.py
@@ -140,7 +140,7 @@ OPTIONAL_HEADERS = [
"emmintrin.h", # SSE2
"immintrin.h", # AVX
"features.h", # for glibc version linux
- "xlocale.h", # see GH#8367
+ "locale.h", # see GH#8367
"dlfcn.h", # dladdr
"execinfo.h", # backtrace
"libunwind.h", # backtrace for LLVM/Clang using libunwind