mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
crc32 feature detection from auxiliary vectors on FreeBSD
This commit is contained in:
parent
e11468a79b
commit
67b0e435f3
1 changed files with 9 additions and 0 deletions
|
@ -26,6 +26,15 @@
|
||||||
# include <asm/hwcap.h>
|
# include <asm/hwcap.h>
|
||||||
# elif defined(__APPLE__)
|
# elif defined(__APPLE__)
|
||||||
# include <sys/sysctl.h>
|
# include <sys/sysctl.h>
|
||||||
|
# elif defined(__FreeBSD__)
|
||||||
|
# include <sys/auxv.h>
|
||||||
|
|
||||||
|
static unsigned long getauxval(unsigned long key) {
|
||||||
|
unsigned long ret = 0;
|
||||||
|
if (elf_aux_info(key, &ret, sizeof(ret)) != 0)
|
||||||
|
return 0;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
static inline int has_crc32_insn() {
|
static inline int has_crc32_insn() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue