mirror of
https://github.com/librempeg/librempeg
synced 2024-11-22 00:51:37 +00:00
aarch64: Implement support for elf_aux_info(3) on FreeBSD and OpenBSD
FreeBSD 12.0+, OpenBSD -current and what will be OpenBSD 7.6 support elf_aux_info(3). Signed-off-by: Brad Smith <brad@comstyle.com> Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
f8113805a1
commit
996a8e32b4
2
configure
vendored
2
configure
vendored
@ -2361,6 +2361,7 @@ SYSTEM_FUNCS="
|
|||||||
clock_gettime
|
clock_gettime
|
||||||
closesocket
|
closesocket
|
||||||
CommandLineToArgvW
|
CommandLineToArgvW
|
||||||
|
elf_aux_info
|
||||||
fcntl
|
fcntl
|
||||||
getaddrinfo
|
getaddrinfo
|
||||||
getauxval
|
getauxval
|
||||||
@ -6558,6 +6559,7 @@ check_func_headers mach/mach_time.h mach_absolute_time
|
|||||||
check_func_headers stdlib.h getenv
|
check_func_headers stdlib.h getenv
|
||||||
check_func_headers sys/stat.h lstat
|
check_func_headers sys/stat.h lstat
|
||||||
check_func_headers sys/auxv.h getauxval
|
check_func_headers sys/auxv.h getauxval
|
||||||
|
check_func_headers sys/auxv.h elf_aux_info
|
||||||
check_func_headers sys/sysctl.h sysctlbyname
|
check_func_headers sys/sysctl.h sysctlbyname
|
||||||
|
|
||||||
check_func_headers windows.h GetModuleHandle
|
check_func_headers windows.h GetModuleHandle
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include "libavutil/cpu_internal.h"
|
#include "libavutil/cpu_internal.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#if (defined(__linux__) || defined(__ANDROID__)) && HAVE_GETAUXVAL
|
#if HAVE_GETAUXVAL || HAVE_ELF_AUX_INFO
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <sys/auxv.h>
|
#include <sys/auxv.h>
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_GETAUXVAL
|
#if HAVE_GETAUXVAL || HAVE_ELF_AUX_INFO
|
||||||
#include <sys/auxv.h>
|
#include <sys/auxv.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -291,6 +291,13 @@ unsigned long ff_getauxval(unsigned long type)
|
|||||||
{
|
{
|
||||||
#if HAVE_GETAUXVAL
|
#if HAVE_GETAUXVAL
|
||||||
return getauxval(type);
|
return getauxval(type);
|
||||||
|
#elif HAVE_ELF_AUX_INFO
|
||||||
|
unsigned long aux = 0;
|
||||||
|
int ret = elf_aux_info(type, &aux, sizeof(aux));
|
||||||
|
if (ret != 0) {
|
||||||
|
errno = ret;
|
||||||
|
}
|
||||||
|
return aux;
|
||||||
#else
|
#else
|
||||||
errno = ENOSYS;
|
errno = ENOSYS;
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user