mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 23:08:31 +00:00
Backport main branch improvements (#658)
* Add sys_ prefix to unwrapped system calls * This change also implements getlogin() and getlogin_r(). * Add getgroups and setgroups (#619) * Fix getgroups / setgroups tests across platforms. See #619 * Change accept type to struct sockaddr * (#630) * vista: use old strace path
This commit is contained in:
parent
4381b3d925
commit
f4ff1729d1
831 changed files with 1381 additions and 1822 deletions
|
@ -20,10 +20,10 @@
|
|||
#include "libc/fmt/conv.h"
|
||||
#include "libc/intrin/kprintf.h"
|
||||
#include "libc/log/check.h"
|
||||
#include "libc/stdio/rand.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/sock/sock.h"
|
||||
#include "libc/sock/struct/sockaddr.h"
|
||||
#include "libc/stdio/rand.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/sysv/consts/af.h"
|
||||
#include "libc/sysv/consts/ipproto.h"
|
||||
|
@ -89,7 +89,8 @@ void TcpServer(void) {
|
|||
ip, ntohs(addr2.sin_port));
|
||||
for (;;) {
|
||||
addrsize2 = sizeof(struct sockaddr_in);
|
||||
CHECK_NE(-1, (client = accept(sock, &addr2, &addrsize2)));
|
||||
CHECK_NE(-1,
|
||||
(client = accept(sock, (struct sockaddr *)&addr2, &addrsize2)));
|
||||
ip = ntohl(addr2.sin_addr.s_addr);
|
||||
kprintf("got client %hhu.%hhu.%hhu.%hhu %hu%n", ip >> 24, ip >> 16, ip >> 8,
|
||||
ip, ntohs(addr2.sin_port));
|
||||
|
|
|
@ -1410,7 +1410,7 @@ static void OnExit(void) {
|
|||
|
||||
static void MakeLatencyLittleLessBad(void) {
|
||||
_peekall();
|
||||
LOGIFNEG1(mlockall(MCL_CURRENT));
|
||||
LOGIFNEG1(sys_mlockall(MCL_CURRENT));
|
||||
LOGIFNEG1(nice(-5));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue