Skip to content

Commit c097b27

Browse files
committed
Check for sys/auxv.h before using it.
Fixes aarch64 compile with uclibc-ng (does not provide sys/auxv.h header file). Signed-off-by: Peter Seiderer <ps.report@gmx.net>
1 parent b2f7be7 commit c097b27

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,7 @@ resolv.h \
397397
strings.h \
398398
syslog.h \
399399
sysexits.h \
400+
sys/auxv.h \
400401
sys/ioctl.h \
401402
sys/file.h \
402403
sys/mman.h \

ext/standard/crc32.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include "basic_functions.h"
1919
#include "crc32.h"
2020

21-
#if defined(__aarch64__)
21+
#if defined(__aarch64__) && defined(HAVE_SYS_AUXV_H)
2222
# include <arm_acle.h>
2323
# if defined(__linux__)
2424
# include <sys/auxv.h>
@@ -83,7 +83,7 @@ PHP_FUNCTION(crc32)
8383

8484
crc = crcinit^0xFFFFFFFF;
8585

86-
#if defined(__aarch64__)
86+
#if defined(__aarch64__) && defined(HAVE_SYS_AUXV_H)
8787
if (has_crc32_insn()) {
8888
crc = crc32_aarch64(crc, p, nr);
8989
RETURN_LONG(crc^0xFFFFFFFF);

0 commit comments

Comments
 (0)