summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authortv <tv@pkgsrc.org>2005-03-12 06:05:33 +0000
committertv <tv@pkgsrc.org>2005-03-12 06:05:33 +0000
commit19aa3f4fa680f13b8060293cdf990cb1c5aadeec (patch)
treec27fe61f52ade0d5eeb3478ad6e44541969834cd /net
parent2f03b317d2af2da690317100aecb11242cfa1915 (diff)
downloadpkgsrc-19aa3f4fa680f13b8060293cdf990cb1c5aadeec.tar.gz
If poll(2) is missing, don't even contemplate using it.
Fixes build on Interix.
Diffstat (limited to 'net')
-rw-r--r--net/adns/distinfo4
-rw-r--r--net/adns/patches/patch-ac38
-rw-r--r--net/adns/patches/patch-ad27
3 files changed, 68 insertions, 1 deletions
diff --git a/net/adns/distinfo b/net/adns/distinfo
index 47140d984c4..2f9884f4337 100644
--- a/net/adns/distinfo
+++ b/net/adns/distinfo
@@ -1,7 +1,9 @@
-$NetBSD: distinfo,v 1.8 2005/02/24 12:13:42 agc Exp $
+$NetBSD: distinfo,v 1.9 2005/03/12 06:05:33 tv Exp $
SHA1 (adns-1.1.tar.gz) = cd47dfc819b147b3275eaf6316f17f15be7187e5
RMD160 (adns-1.1.tar.gz) = c6198f864afc40657dd94b7a94cf59a483ab7581
Size (adns-1.1.tar.gz) = 211455 bytes
SHA1 (patch-aa) = 17764ad5a7557bcda1fda5fdb62fbb7d4e0cd075
SHA1 (patch-ab) = 3eaa20dbe95de934693c00b73d42fbaf8ff5e5e9
+SHA1 (patch-ac) = 2928cd6ccd224bc6d355e52b2f8dc149beaaff84
+SHA1 (patch-ad) = 5ce6a933673c82b2058ff67223057bbf18f5d8bb
diff --git a/net/adns/patches/patch-ac b/net/adns/patches/patch-ac
new file mode 100644
index 00000000000..b7b61840492
--- /dev/null
+++ b/net/adns/patches/patch-ac
@@ -0,0 +1,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();
+ }
diff --git a/net/adns/patches/patch-ad b/net/adns/patches/patch-ad
new file mode 100644
index 00000000000..9248023f8d7
--- /dev/null
+++ b/net/adns/patches/patch-ad
@@ -0,0 +1,27 @@
+$NetBSD: patch-ad,v 1.1 2005/03/12 06:05:33 tv Exp $
+
+--- client/adnstest.c.orig 2000-09-16 20:24:24.000000000 -0400
++++ client/adnstest.c
+@@ -59,7 +59,7 @@ static void quitnow(int rc) {
+ exit(rc);
+ }
+
+-#ifndef HAVE_POLL
++#if 0
+ #undef poll
+ int poll(struct pollfd *ufds, int nfds, int timeout) {
+ fputs("poll(2) not supported on this system\n",stderr);
+@@ -292,9 +292,12 @@ int main(int argc, char *const *argv) {
+ mc= 0;
+ }
+
++#ifdef HAVE_POLL
+ if (strchr(owninitflags,'p')) {
+ r= adns_wait_poll(ads,&qu,&ans,&mcr);
+- } else {
++ } else
++#endif
++ {
+ r= adns_wait(ads,&qu,&ans,&mcr);
+ }
+ if (r) failure_errno("wait/check",r);