summaryrefslogtreecommitdiff
path: root/userland/libc/netdb/getaddrinfo.c
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-12-16 20:26:20 +0100
committerAnton Kling <anton@kling.gg>2024-12-16 20:29:43 +0100
commit9501c3f45b9b5d3b2cef5e78c83c362dbe6295a5 (patch)
tree023d97e2e476e3e197c840d136e8c6cf8449cded /userland/libc/netdb/getaddrinfo.c
parent3f8324fde2128c3308f957891262d3372fb57ebf (diff)
libc: Add gai_strerror
Diffstat (limited to 'userland/libc/netdb/getaddrinfo.c')
-rw-r--r--userland/libc/netdb/getaddrinfo.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/userland/libc/netdb/getaddrinfo.c b/userland/libc/netdb/getaddrinfo.c
index f7e89c0..f19d11a 100644
--- a/userland/libc/netdb/getaddrinfo.c
+++ b/userland/libc/netdb/getaddrinfo.c
@@ -1,6 +1,7 @@
#include <arpa/inet.h>
#include <assert.h>
#include <ctype.h>
+#include <netdb.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
@@ -88,11 +89,6 @@ int connect_dns(void) {
hints.ai_next = NULL;
*/
-#define EAI_AGAIN 1
-#define EAI_FAIL 2
-#define EAI_NONAME 3
-#define EAI_MEMORY 4
-
u16 service_to_port(const char *service) {
int is_number = 0;
for (int i = 0; service[i]; i++) {