Skip to content

Commit

Permalink
Add header to src/dns.cc to compile on FreeBSD.
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Aug 1, 2009
1 parent c745383 commit 207bd3c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/dns.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <stdlib.h> /* exit() */
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>

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

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

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

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

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

0 comments on commit 207bd3c

Please sign in to comment.