]> xenbits.xensource.com Git - unikraft/libs/lwip.git/commitdiff
Add missing EAI_* macro definitions
authorFelipe Huici <felipe.huici@neclab.eu>
Mon, 9 Dec 2019 08:19:24 +0000 (09:19 +0100)
committerFelipe Huici <felipe.huici@neclab.eu>
Thu, 12 Dec 2019 07:29:24 +0000 (08:29 +0100)
Signed-off-by: Felipe Huici <felipe.huici@neclab.eu>
Reviewed-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@stud.acs.upb.ro>
include/netdb.h

index 948a2e7c46807113c0c6cea7a1f008b11dfedc30..6944c59df51fb6bcc0197fbabbe4f474cbea7b37 100644 (file)
@@ -1,3 +1,5 @@
+#ifndef _LWIP_GLUE_NETDB_H_
+#define _LWIP_GLUE_NETDB_H_
 #include <compat/posix/netdb.h>
 
 #if LWIP_DNS && LWIP_SOCKET
@@ -58,12 +60,15 @@ void setprotoent(int stayopen);
 #define NI_DGRAM        0x10
 #define NI_NUMERICSCOPE 0x20
 
-/* Error value for getservbyport_r not defined by lwip/netdb.h */
-/* Imported from musl */
-#define EAI_SYSTEM     11
-
-/* Error values for getaddrinfo() not defined by lwip/netdb.h */
-#define EAI_OVERFLOW    205      /* Argument buffer overflow.  */
+/* Error values for getaddrinfo() and getservbyport_r not defined */
+/* by lwip/netdb.h */
+#define EAI_BADFLAGS   -1
+#define EAI_AGAIN      -3
+#define EAI_NODATA     -5
+#define EAI_SOCKTYPE   -7
+#define EAI_ADDRFAMILY -9
+#define EAI_SYSTEM     -11
+#define EAI_OVERFLOW   -12
 
 int getnameinfo(const struct sockaddr *addr, socklen_t addrlen,
                char *host, socklen_t hostlen,
@@ -73,4 +78,5 @@ struct servent *getservbyname(const char *name, const char *proto);
 struct servent *getservbyport(int port, const char *proto);
 int getservbyport_r(int port, const char *prots, struct servent *se,
                    char *buf, size_t buflen, struct servent **res);
+#endif