2016-01-21 23:40:00 +01:00

32 lines
815 B
Plaintext

$NetBSD: patch-ad,v 1.3 2015/01/29 09:47:03 mef Exp $
date: 2005-03-12 15:05:33 +0900; author: tv; state: Exp;
If poll(2) is missing, don't even contemplate using it.
Fixes build on Interix.
--- client/adnstest.c.orig 2006-04-08 14:36:57.000000000 +0000
+++ client/adnstest.c
@@ -58,7 +58,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);
@@ -302,9 +302,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);