mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-08 20:28:30 +00:00
Fix flakes in runitd and popen_test
This commit is contained in:
parent
801224df67
commit
2ebc5781a1
18 changed files with 123 additions and 34 deletions
|
@ -20,6 +20,7 @@
|
|||
#include "libc/limits.h"
|
||||
#include "libc/macros.internal.h"
|
||||
#include "libc/nt/struct/linger.h"
|
||||
#include "libc/nt/thunk/msabi.h"
|
||||
#include "libc/sock/internal.h"
|
||||
#include "libc/sock/struct/linger.h"
|
||||
#include "libc/sock/syscall_fd.internal.h"
|
||||
|
@ -28,6 +29,8 @@
|
|||
#include "libc/sysv/consts/sol.h"
|
||||
#include "libc/sysv/errfuns.h"
|
||||
|
||||
__msabi extern typeof(__sys_setsockopt_nt) *const __imp_setsockopt;
|
||||
|
||||
textwindows int sys_setsockopt_nt(struct Fd *fd, int level, int optname,
|
||||
const void *optval, uint32_t optlen) {
|
||||
int64_t ms, micros;
|
||||
|
@ -70,7 +73,7 @@ textwindows int sys_setsockopt_nt(struct Fd *fd, int level, int optname,
|
|||
}
|
||||
}
|
||||
|
||||
if (__sys_setsockopt_nt(fd->handle, level, optname, optval, optlen) != -1) {
|
||||
if (__imp_setsockopt(fd->handle, level, optname, optval, optlen) != -1) {
|
||||
return 0;
|
||||
} else {
|
||||
return __winsockerr();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue