Fix flakes in runitd and popen_test

This commit is contained in:
Justine Tunney 2023-07-30 04:26:34 -07:00
parent 801224df67
commit 2ebc5781a1
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
18 changed files with 123 additions and 34 deletions

View file

@ -19,6 +19,7 @@
#include "libc/assert.h"
#include "libc/calls/struct/timeval.h"
#include "libc/nt/struct/linger.h"
#include "libc/nt/thunk/msabi.h"
#include "libc/nt/winsock.h"
#include "libc/sock/internal.h"
#include "libc/sock/sock.h"
@ -29,6 +30,8 @@
#include "libc/sysv/consts/sol.h"
#include "libc/sysv/errfuns.h"
__msabi extern typeof(__sys_getsockopt_nt) *const __imp_getsockopt;
textwindows int sys_getsockopt_nt(struct Fd *fd, int level, int optname,
void *out_opt_optval,
uint32_t *inout_optlen) {
@ -63,8 +66,8 @@ textwindows int sys_getsockopt_nt(struct Fd *fd, int level, int optname,
}
// TODO(jart): Use WSAIoctl?
if (__sys_getsockopt_nt(fd->handle, level, optname, out_opt_optval,
inout_optlen) == -1) {
if (__imp_getsockopt(fd->handle, level, optname, out_opt_optval,
inout_optlen) == -1) {
return __winsockerr();
}