mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-31 17:52:27 +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
|
@ -23,6 +23,10 @@
|
|||
#include "libc/calls/struct/iovec.h"
|
||||
#include "libc/calls/struct/iovec.internal.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/intrin/kprintf.h"
|
||||
#include "libc/intrin/strace.internal.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/sock/sock.h"
|
||||
#include "libc/sock/struct/msghdr.h"
|
||||
#include "libc/sock/struct/msghdr.internal.h"
|
||||
|
@ -99,12 +103,12 @@ ssize_t recvmsg(int fd, struct msghdr *msg, int flags) {
|
|||
}
|
||||
END_CANCELATION_POINT;
|
||||
|
||||
#if defined(SYSDEBUG) && _DATATRACE
|
||||
#if SYSDEBUG && _DATATRACE
|
||||
if (__strace > 0 && strace_enabled(0) > 0) {
|
||||
if (!msg || (rc == -1 && errno == EFAULT)) {
|
||||
DATATRACE("recvmsg(%d, %p, %#x) → %'ld% m", fd, msg, flags, rc);
|
||||
} else {
|
||||
kprintf(STRACE_PROLOGUE "recvmsg(%d, [{");
|
||||
kprintf(STRACE_PROLOGUE "recvmsg(%d, [{", fd);
|
||||
if (msg->msg_namelen)
|
||||
kprintf(".name=%#.*hhs, ", msg->msg_namelen, msg->msg_name);
|
||||
if (msg->msg_controllen)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue