summaryrefslogtreecommitdiff
path: root/lib/export/samples/sample-request.c
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2015-04-08 17:52:54 +0000
committerXin LI <delphij@FreeBSD.org>2015-04-08 17:52:54 +0000
commit7ba7a5de74780dee4ec54bace1ec36427be1d8b8 (patch)
treea5a1890b0b884a1d303e90c4130c3b731772abd5 /lib/export/samples/sample-request.c
parenta2bc50f814b6966b412ba90221460066a8b31951 (diff)
Notes
Diffstat (limited to 'lib/export/samples/sample-request.c')
-rw-r--r--lib/export/samples/sample-request.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/export/samples/sample-request.c b/lib/export/samples/sample-request.c
index 8d36a2cebde4..e39c21e8e647 100644
--- a/lib/export/samples/sample-request.c
+++ b/lib/export/samples/sample-request.c
@@ -213,7 +213,9 @@ main(int argc, char *argv[]) {
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_DGRAM;
hints.ai_protocol = IPPROTO_UDP;
+#ifdef AI_NUMERICHOST
hints.ai_flags = AI_NUMERICHOST;
+#endif
gai_error = getaddrinfo(argv[0], "53", &hints, &res);
if (gai_error != 0) {
fprintf(stderr, "getaddrinfo failed: %s\n",