pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/net/adns If poll(2) is missing, don't even contemplate...
details: https://anonhg.NetBSD.org/pkgsrc/rev/17c62939095b
branches: trunk
changeset: 490476:17c62939095b
user: tv <tv%pkgsrc.org@localhost>
date: Sat Mar 12 06:05:33 2005 +0000
description:
If poll(2) is missing, don't even contemplate using it.
Fixes build on Interix.
diffstat:
net/adns/distinfo | 4 +++-
net/adns/patches/patch-ac | 38 ++++++++++++++++++++++++++++++++++++++
net/adns/patches/patch-ad | 27 +++++++++++++++++++++++++++
3 files changed, 68 insertions(+), 1 deletions(-)
diffs (87 lines):
diff -r 4554512f621f -r 17c62939095b net/adns/distinfo
--- a/net/adns/distinfo Sat Mar 12 05:42:48 2005 +0000
+++ b/net/adns/distinfo Sat Mar 12 06:05:33 2005 +0000
@@ -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 -r 4554512f621f -r 17c62939095b net/adns/patches/patch-ac
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/adns/patches/patch-ac Sat Mar 12 06:05:33 2005 +0000
@@ -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 -r 4554512f621f -r 17c62939095b net/adns/patches/patch-ad
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/adns/patches/patch-ad Sat Mar 12 06:05:33 2005 +0000
@@ -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);
Home |
Main Index |
Thread Index |
Old Index