mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-05-20 03:46:21 +03:00
Use openat syscall if available
Some architectures like AArch64 may not have the open syscall because it was superseded by the openat syscall, so check and use SYS_openat if SYS_open is not available. Additionally, Android headers for AArch64 define SYS_open to __NR_open, even though __NR_open is undefined. Undefine SYS_open in that case so SYS_openat is used.
This commit is contained in:
parent
807a9a3e17
commit
7883c7749f
3 changed files with 11 additions and 0 deletions
|
|
@ -14,6 +14,11 @@
|
|||
# if !defined(SYS_write) && defined(__NR_write)
|
||||
# define SYS_write __NR_write
|
||||
# endif
|
||||
# if defined(SYS_open) && defined(__aarch64__)
|
||||
/* Android headers may define SYS_open to __NR_open even though
|
||||
* __NR_open may not exist on AArch64 (superseded by __NR_openat). */
|
||||
# undef SYS_open
|
||||
# endif
|
||||
# include <sys/uio.h>
|
||||
# endif
|
||||
# include <pthread.h>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue