summaryrefslogtreecommitdiff
path: root/net/adns/patches/patch-ac
blob: b7b618404928d7320e1221db9c495773e1048e12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
$NetBSD: patch-ac,v 1.4 2005/03/12 06:05:33 tv Exp $

--- client/adnslogres.c.orig	2000-09-17 10:09:02.000000000 -0400
+++ client/adnslogres.c
@@ -186,9 +186,11 @@ static void proclog(FILE *inf, FILE *out
 	msg("%d in queue; checking %.*s", len,
 	    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);
@@ -223,7 +225,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);
@@ -268,9 +272,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();
     }