Merge pull request #154 from pbhenson/fix_-4_bug

Fix -4 option when IPv6 disabled
pull/167/head
David Schweikert 5 years ago committed by GitHub
commit 88963ebb1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -427,11 +427,13 @@ int main(int argc, char** argv)
while ((c = optparse_long(&optparse_state, longopts, NULL)) != EOF) {
switch (c) {
case '4':
#ifdef IPV6
if (hints_ai_family != AF_UNSPEC) {
fprintf(stderr, "%s: can't specify both -4 and -6\n", prog);
exit(1);
}
hints_ai_family = AF_INET;
#endif
break;
case '6':
#ifdef IPV6

Loading…
Cancel
Save