Skip to content

Commit 207bd3c

Browse files
committed
Add header to src/dns.cc to compile on FreeBSD.
1 parent c745383 commit 207bd3c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/dns.cc

+3-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <stdlib.h> /* exit() */
66
#include <sys/types.h>
77
#include <sys/socket.h>
8+
#include <netinet/in.h>
89
#include <arpa/inet.h>
910

1011
#include <v8.h>
@@ -100,7 +101,7 @@ AfterResolveA4 (struct dns_ctx *ctx, struct dns_rr_a4 *result, void *data)
100101
HandleScope loop_scope;
101102

102103
char ip[INET_ADDRSTRLEN];
103-
inet_ntop(AF_INET, &(result->dnsa4_addr[i]), ip, INET_ADDRSTRLEN);
104+
dns_ntop(AF_INET, &(result->dnsa4_addr[i]), ip, INET_ADDRSTRLEN);
104105
Local<String> address = String::New(ip);
105106

106107
addresses->Set(Integer::New(i), address);
@@ -136,7 +137,7 @@ AfterResolveA6 (struct dns_ctx *ctx, struct dns_rr_a6 *result, void *data)
136137
HandleScope loop_scope;
137138

138139
char ip[INET6_ADDRSTRLEN];
139-
inet_ntop(AF_INET6, &(result->dnsa6_addr[i]), ip, INET6_ADDRSTRLEN);
140+
dns_ntop(AF_INET6, &(result->dnsa6_addr[i]), ip, INET6_ADDRSTRLEN);
140141
Local<String> address = String::New(ip);
141142

142143
addresses->Set(Integer::New(i), address);

0 commit comments

Comments
 (0)