mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-09-29 15:06:40 -04:00
43 lines
1.4 KiB
Plaintext
43 lines
1.4 KiB
Plaintext
$NetBSD: patch-ac,v 1.6 2015/01/29 09:47:03 mef Exp $
|
|
|
|
date: 2005-03-12 15:05:33 +0900; author: tv; state: Exp; lines: +37 -15;
|
|
If poll(2) is missing, don't even contemplate using it.
|
|
Fixes build on Interix.
|
|
|
|
--- 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();
|
|
}
|