mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-01 16:58:30 +00:00
Add libresolv from Musl Libc
Locally modified to get nameservers from Windows Registry when `\etc\resolv.conf` isn't defined.
This commit is contained in:
parent
8874a37abc
commit
1a96de6eda
36 changed files with 2313 additions and 73 deletions
|
@ -22,6 +22,7 @@
|
|||
#include "libc/intrin/kprintf.h"
|
||||
#include "libc/intrin/likely.h"
|
||||
#include "libc/intrin/strace.internal.h"
|
||||
#include "libc/nt/runtime.h"
|
||||
#include "libc/nt/thunk/msabi.h"
|
||||
#include "libc/nt/winsock.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
|
@ -39,7 +40,7 @@ textwindows int WSARecvFrom(
|
|||
struct NtOverlapped *opt_inout_lpOverlapped,
|
||||
const NtWsaOverlappedCompletionRoutine opt_lpCompletionRoutine) {
|
||||
int rc;
|
||||
#if defined(SYSDEBUG) && _NTTRACE
|
||||
#if SYSDEBUG && _NTTRACE
|
||||
uint32_t NumberOfBytesRecvd;
|
||||
if (opt_out_lpNumberOfBytesRecvd) {
|
||||
NumberOfBytesRecvd = *opt_out_lpNumberOfBytesRecvd;
|
||||
|
@ -55,10 +56,10 @@ textwindows int WSARecvFrom(
|
|||
kprintf(STRACE_PROLOGUE "WSARecvFrom(%lu, [", s);
|
||||
DescribeIovNt(inout_lpBuffers, dwBufferCount,
|
||||
rc != -1 ? NumberOfBytesRecvd : 0);
|
||||
kprintf("], %u, [%'u], %p, %p, %p, %s, %p) → %d% lm\n", dwBufferCount,
|
||||
kprintf("], %u, [%'u], %p, %p, %p, %s, %p) → %d %d\n", dwBufferCount,
|
||||
NumberOfBytesRecvd, opt_out_fromsockaddr, opt_inout_fromsockaddrlen,
|
||||
inout_lpFlags, DescribeNtOverlapped(opt_inout_lpOverlapped),
|
||||
opt_lpCompletionRoutine, rc);
|
||||
opt_lpCompletionRoutine, rc, GetLastError());
|
||||
}
|
||||
#else
|
||||
rc = __imp_WSARecvFrom(s, inout_lpBuffers, dwBufferCount,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue