summaryrefslogtreecommitdiffstats
path: root/regress/lib/libc/asr/bin/getaddrinfo.c
diff options
context:
space:
mode:
authoreric <eric@openbsd.org>2018-12-15 15:16:12 +0000
committereric <eric@openbsd.org>2018-12-15 15:16:12 +0000
commita9e850503858625db8c9b559960909d88f57d4ab (patch)
tree23b8f4d2da16449bc6342ad5f6548ea7ba7acf09 /regress/lib/libc/asr/bin/getaddrinfo.c
parentremove unused and problematic sudo clean. ok espie (diff)
downloadwireguard-openbsd-a9e850503858625db8c9b559960909d88f57d4ab.tar.xz
wireguard-openbsd-a9e850503858625db8c9b559960909d88f57d4ab.zip
add a -R option to set/unset resolver flags.
use strcasecmp for reading args.
Diffstat (limited to 'regress/lib/libc/asr/bin/getaddrinfo.c')
-rw-r--r--regress/lib/libc/asr/bin/getaddrinfo.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/regress/lib/libc/asr/bin/getaddrinfo.c b/regress/lib/libc/asr/bin/getaddrinfo.c
index 7b8674aea95..6605a00c1b8 100644
--- a/regress/lib/libc/asr/bin/getaddrinfo.c
+++ b/regress/lib/libc/asr/bin/getaddrinfo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: getaddrinfo.c,v 1.2 2013/03/28 09:36:03 eric Exp $ */
+/* $OpenBSD: getaddrinfo.c,v 1.3 2018/12/15 15:16:12 eric Exp $ */
/*
* Copyright (c) 2012 Eric Faurot <eric@openbsd.org>
*
@@ -48,7 +48,7 @@ main(int argc, char *argv[])
memset(&hints, 0, sizeof hints);
- while((ch = getopt(argc, argv, "CFHPSef:p:s:t:")) != -1) {
+ while((ch = getopt(argc, argv, "CFHPR:Sef:p:s:t:")) != -1) {
switch(ch) {
case 'C':
hints.ai_flags |= AI_CANONNAME;
@@ -62,6 +62,9 @@ main(int argc, char *argv[])
case 'P':
hints.ai_flags |= AI_PASSIVE;
break;
+ case 'R':
+ parseresopt(optarg);
+ break;
case 'S':
hints.ai_flags |= AI_NUMERICSERV;
break;