39 lines
1.2 KiB
Plaintext
39 lines
1.2 KiB
Plaintext
$NetBSD: patch-ac,v 1.5 2010/04/17 12:43:03 obache Exp $
|
|
|
|
--- client/adnslogres.c.orig 2006-05-09 19:37:58.000000000 +0000
|
|
+++ client/adnslogres.c
|
|
@@ -188,9 +188,11 @@ static void proclog(FILE *inf, FILE *out
|
|
msg("%d in queue; checking %.*s", len,
|
|
(int)(head->rest-head->addr), guard_null(head->addr));
|
|
if (eof || len >= maxpending) {
|
|
+#ifdef HAVE_POLL
|
|
if (opts & OPT_POLL)
|
|
err= adns_wait_poll(adns, &head->query, &answer, NULL);
|
|
else
|
|
+#endif
|
|
err= adns_wait(adns, &head->query, &answer, NULL);
|
|
} else {
|
|
err= adns_check(adns, &head->query, &answer, NULL);
|
|
@@ -225,7 +227,9 @@ static void printhelp(FILE *file) {
|
|
fputs("usage: adnslogres [<options>] [<logfile>]\n"
|
|
" adnslogres --version|--help\n"
|
|
"options: -c <concurrency> set max number of outstanding queries\n"
|
|
+#ifdef HAVE_POLL
|
|
" -p use poll(2) instead of select(2)\n"
|
|
+#endif
|
|
" -d turn on debugging\n"
|
|
" -C <config> use instead of contents of resolv.conf\n",
|
|
stdout);
|
|
@@ -270,9 +274,11 @@ int main(int argc, char *argv[]) {
|
|
case 'd':
|
|
opts|= OPT_DEBUG;
|
|
break;
|
|
+#ifdef HAVE_POLL
|
|
case 'p':
|
|
opts|= OPT_POLL;
|
|
break;
|
|
+#endif
|
|
default:
|
|
usage();
|
|
}
|