summaryrefslogtreecommitdiff
path: root/lib/export/samples/sample-request.c
diff options
context:
space:
mode:
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 8d36a2cebde44..e39c21e8e6477 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",