1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:24:57 +00:00

LibC: Stub out the rest of the getnameinfo flags

These are required for the compilation of some ports.
This commit is contained in:
Idan Horowitz 2021-12-02 01:09:47 +02:00 committed by Andreas Kling
parent 8074157c10
commit d68242ba2f
2 changed files with 4 additions and 2 deletions

View file

@ -788,8 +788,8 @@ int getnameinfo(const struct sockaddr* __restrict addr, socklen_t addrlen, char*
const sockaddr_in* sin = reinterpret_cast<const sockaddr_in*>(addr);
if (host && hostlen > 0) {
if (flags & NI_NAMEREQD)
dbgln("getnameinfo flag NI_NAMEREQD not implemented");
if (flags != 0)
dbgln("getnameinfo flags are not implemented: {:#x}", flags);
if (!inet_ntop(AF_INET, &sin->sin_addr, host, hostlen)) {
if (errno == ENOSPC)

View file

@ -93,6 +93,8 @@ struct addrinfo {
#define NI_NUMERICHOST 1
#define NI_NUMERICSERV 2
#define NI_NAMEREQD 3
#define NI_NOFQDN 4
#define NI_DGRAM 5
int getaddrinfo(const char* __restrict node, const char* __restrict service, const struct addrinfo* __restrict hints, struct addrinfo** __restrict res);
void freeaddrinfo(struct addrinfo* res);