mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-26 04:20:30 +00:00
Get TEST_LIBC_CALLS passing on AARCH64
This commit is contained in:
parent
802e7eb4ef
commit
ba49e86e20
22 changed files with 65 additions and 7 deletions
|
@ -64,9 +64,12 @@ int raise(int sig) {
|
|||
if (sig == SIGTRAP) {
|
||||
DebugBreak();
|
||||
rc = 0;
|
||||
#ifndef __aarch64__
|
||||
} else if (sig == SIGFPE) {
|
||||
// TODO(jart): Why doesn't AARCH64 raise SIGFPE?
|
||||
RaiseSigFpe();
|
||||
rc = 0;
|
||||
#endif
|
||||
} else if (!IsWindows() && !IsMetal()) {
|
||||
rc = sys_tkill(gettid(), sig, 0);
|
||||
} else {
|
||||
|
|
|
@ -96,10 +96,12 @@ static const struct sock_filter kUnveilBlacklistLatestAbi[] = {
|
|||
};
|
||||
|
||||
static int landlock_abi_version;
|
||||
static int landlock_abi_errno;
|
||||
|
||||
__attribute__((__constructor__)) void init_landlock_version() {
|
||||
landlock_abi_version =
|
||||
landlock_create_ruleset(0, 0, LANDLOCK_CREATE_RULESET_VERSION);
|
||||
landlock_abi_errno = errno;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -153,6 +155,7 @@ static int unveil_init(void) {
|
|||
int rc, fd;
|
||||
State.fs_mask = UNVEIL_READ | UNVEIL_WRITE | UNVEIL_EXEC | UNVEIL_CREATE;
|
||||
if (landlock_abi_version == -1) {
|
||||
errno = landlock_abi_errno;
|
||||
if (errno == EOPNOTSUPP) {
|
||||
errno = ENOSYS;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue