mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-03 11:12:27 +00:00
Mint APE Loader v1.5
This change ports APE Loader to Linux AARCH64, so that Raspberry Pi users can run programs like redbean, without the executable needing to modify itself. Progress has also slipped into this change on the issue of making progress better conforming to user expectations and industry standards regarding which symbols we're allowed to declare
This commit is contained in:
parent
6843150e0c
commit
7e0a09feec
510 changed files with 1783 additions and 1483 deletions
|
@ -41,14 +41,14 @@ int sys_accept4(int server, struct sockaddr_storage *addr, int flags) {
|
|||
if ((client = __sys_accept(server, addr, &size, 0)) != -1) {
|
||||
// __sys_accept() has inconsistent flag inheritence across platforms
|
||||
// this is one of the issues that accept4() was invented for solving
|
||||
_unassert((file_mode = __sys_fcntl(client, F_GETFD)) != -1);
|
||||
_unassert(!__sys_fcntl(client, F_SETFD,
|
||||
((file_mode & ~FD_CLOEXEC) |
|
||||
(flags & SOCK_CLOEXEC ? FD_CLOEXEC : 0))));
|
||||
_unassert((file_mode = __sys_fcntl(client, F_GETFL)) != -1);
|
||||
_unassert(!__sys_fcntl(client, F_SETFL,
|
||||
((file_mode & ~O_NONBLOCK) |
|
||||
(flags & SOCK_NONBLOCK ? O_NONBLOCK : 0))));
|
||||
unassert((file_mode = __sys_fcntl(client, F_GETFD)) != -1);
|
||||
unassert(!__sys_fcntl(client, F_SETFD,
|
||||
((file_mode & ~FD_CLOEXEC) |
|
||||
(flags & SOCK_CLOEXEC ? FD_CLOEXEC : 0))));
|
||||
unassert((file_mode = __sys_fcntl(client, F_GETFL)) != -1);
|
||||
unassert(!__sys_fcntl(client, F_SETFL,
|
||||
((file_mode & ~O_NONBLOCK) |
|
||||
(flags & SOCK_NONBLOCK ? O_NONBLOCK : 0))));
|
||||
}
|
||||
}
|
||||
return client;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue