]> git.meshlink.io Git - meshlink/commitdiff
Use AI_* instead of NI_* constants for getaddrinfo().
authorGuus Sliepen <guus@meshlink.io>
Thu, 14 Jan 2021 21:10:45 +0000 (22:10 +0100)
committerGuus Sliepen <guus@meshlink.io>
Thu, 14 Jan 2021 21:10:45 +0000 (22:10 +0100)
src/netutl.c

index 9988b123728aff79fe08ac8d7a4d16db6aef4f2f..2dcf1e47ead24a3b9ac630a87c6c7f103747772b 100644 (file)
@@ -58,7 +58,7 @@ sockaddr_t str2sockaddr(const char *address, const char *port) {
 
        struct addrinfo hint = {
                .ai_family = AF_UNSPEC,
-               .ai_flags = NI_NUMERICHOST | NI_NUMERICSERV,
+               .ai_flags = AI_NUMERICHOST | AI_NUMERICSERV,
                .ai_socktype = SOCK_STREAM,
        };
 
@@ -87,7 +87,7 @@ sockaddr_t str2sockaddr_random(struct meshlink_handle *mesh, const char *address
 
        struct addrinfo hint = {
                .ai_family = AF_UNSPEC,
-               .ai_flags = NI_NUMERICHOST | NI_NUMERICSERV,
+               .ai_flags = AI_NUMERICHOST | AI_NUMERICSERV,
                .ai_socktype = SOCK_STREAM,
        };