mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 00:02:28 +00:00
Fix some more socket bugs
- The functions that return a sockaddr now do so the same way the Linux Kernel does across platforms, e.g. getpeername(), accept4() - Socket system calls on Windows will now only check for interrupts when a blocking operation needs to be performed. - Write tests for recvfrom() system call
This commit is contained in:
parent
ac92f25296
commit
0ba3199915
49 changed files with 347 additions and 352 deletions
|
@ -19,6 +19,7 @@
|
|||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/internal.h"
|
||||
#include "libc/intrin/bits.h"
|
||||
#include "libc/intrin/kprintf.h"
|
||||
#include "libc/log/check.h"
|
||||
#include "libc/log/log.h"
|
||||
#include "libc/mem/gc.internal.h"
|
||||
|
@ -52,7 +53,7 @@ TEST(siocgifconf, test) {
|
|||
ip = ntohl(((struct sockaddr_in *)&ifr->ifr_addr)->sin_addr.s_addr);
|
||||
EXPECT_NE(-1, ioctl(socketfd, SIOCGIFNETMASK, ifr));
|
||||
netmask = ntohl(((struct sockaddr_in *)&ifr->ifr_addr)->sin_addr.s_addr);
|
||||
#if 0
|
||||
#if 1
|
||||
fprintf(stderr,
|
||||
"%s %x %d\n"
|
||||
" ip %hhu.%hhu.%hhu.%hhu\n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue