History

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).

Brad Smith committed 2 years ago

Commit a3f79fd1 parent 1709f383 files · +11 −2Browse files

Unified · Split

3 files
  1. configure +2 −0
  2. libavutil/aarch64/cpu.c +1 −1
  3. libavutil/cpu.c +8 −1
configure+2−0
@@ -2367,6 +2367,7 @@ SYSTEM_FUNCS=" · 2366 unmodified lines
2367 clock_gettime2367 clock_gettime
2368 closesocket2368 closesocket
2369 CommandLineToArgvW2369 CommandLineToArgvW
2370 elf_aux_info
2370 fcntl2371 fcntl
2371 getaddrinfo2372 getaddrinfo
2372 getauxval2373 getauxval
@@ -6579,6 +6580,7 @@ check_func_headers mach/mach_time.h mach_absolute_time · 4206 unmodified lines
6579check_func_headers stdlib.h getenv6580check_func_headers stdlib.h getenv
6580check_func_headers sys/stat.h lstat6581check_func_headers sys/stat.h lstat
6581check_func_headers sys/auxv.h getauxval6582check_func_headers sys/auxv.h getauxval
6583check_func_headers sys/auxv.h elf_aux_info
6582check_func_headers sys/sysctl.h sysctlbyname6584check_func_headers sys/sysctl.h sysctlbyname
6583 6585
6584check_func_headers windows.h GetModuleHandle6586check_func_headers windows.h GetModuleHandle
libavutil/aarch64/cpu.c+1−1
@@ -20,7 +20,7 @@ · 19 unmodified lines
20#include "libavutil/cpu_internal.h"20#include "libavutil/cpu_internal.h"
21#include "config.h"21#include "config.h"
22 22
23#if (defined(__linux__) || defined(__ANDROID__)) && HAVE_GETAUXVAL23#if HAVE_GETAUXVAL || HAVE_ELF_AUX_INFO
24#include <stdint.h>24#include <stdint.h>
25#include <sys/auxv.h>25#include <sys/auxv.h>
26 26
libavutil/cpu.c+8−1
@@ -49,7 +49,7 @@ · 48 unmodified lines
49#include <unistd.h>49#include <unistd.h>
50#endif50#endif
51 51
52#if HAVE_GETAUXVAL52#if HAVE_GETAUXVAL || HAVE_ELF_AUX_INFO
53#include <sys/auxv.h>53#include <sys/auxv.h>
54#endif54#endif
55 55
@@ -292,6 +292,13 @@ unsigned long ff_getauxval(unsigned long type) · 236 unmodified lines
292{292{
293#if HAVE_GETAUXVAL293#if HAVE_GETAUXVAL
294 return getauxval(type);294 return getauxval(type);
295#elif HAVE_ELF_AUX_INFO
296 unsigned long aux = 0;
297 int ret = elf_aux_info(type, &aux, sizeof(aux));
298 if (ret != 0) {
299 errno = ret;
300 }
301 return aux;
295#else302#else
296 errno = ENOSYS;303 errno = ENOSYS;
297 return 0;304 return 0;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t