mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 17:52:26 -05:00
LibC: Stub out some addrinfo things
This commit is contained in:
parent
4519950266
commit
0c07c005b5
Notes:
sideshowbarker
2024-07-18 22:15:01 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/0c07c005b5b Pull-request: https://github.com/SerenityOS/serenity/pull/5325 Issue: https://github.com/SerenityOS/serenity/issues/90 Reviewed-by: https://github.com/BenWiederhake Reviewed-by: https://github.com/linusg Reviewed-by: https://github.com/sunverwerth
2 changed files with 46 additions and 0 deletions
|
@ -654,4 +654,23 @@ static bool fill_getproto_buffers(const char* line, ssize_t read)
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
int getaddrinfo(const char* __restrict node, const char* __restrict service, const struct addrinfo* __restrict hints, struct addrinfo** __restrict res)
|
||||
{
|
||||
(void)node;
|
||||
(void)service;
|
||||
(void)hints;
|
||||
(void)res;
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
void freeaddrinfo(struct addrinfo* res)
|
||||
{
|
||||
(void)res;
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
const char* gai_strerror(int errcode)
|
||||
{
|
||||
(void)errcode;
|
||||
return "Not yet implemented";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -75,4 +75,31 @@ extern int h_errno;
|
|||
#define NO_RECOVERY 103
|
||||
#define TRY_AGAIN 104
|
||||
|
||||
struct addrinfo {
|
||||
int ai_flags;
|
||||
int ai_family;
|
||||
int ai_socktype;
|
||||
int ai_protocol;
|
||||
socklen_t ai_addrlen;
|
||||
struct sockaddr* ai_addr;
|
||||
char* ai_canonname;
|
||||
struct addrinfo* ai_next;
|
||||
};
|
||||
|
||||
#define EAI_ADDRFAMILY 1
|
||||
#define EAI_AGAIN 2
|
||||
#define EAI_BADFLAGS 3
|
||||
#define EAI_FAIL 4
|
||||
#define EAI_FAMILY 5
|
||||
#define EAI_MEMORY 6
|
||||
#define EAI_NODATA 7
|
||||
#define EAI_NONAME 8
|
||||
#define EAI_SERVICE 9
|
||||
#define EAI_SOCKTYPE 10
|
||||
#define EAI_SYSTEM 11
|
||||
|
||||
int getaddrinfo(const char* __restrict node, const char* __restrict service, const struct addrinfo* __restrict hints, struct addrinfo** __restrict res);
|
||||
void freeaddrinfo(struct addrinfo* res);
|
||||
const char* gai_strerror(int errcode);
|
||||
|
||||
__END_DECLS
|
||||
|
|
Loading…
Add table
Reference in a new issue