From: ian Date: Wed, 14 Jul 1999 22:59:34 +0000 (+0000) Subject: Compile without HAVE_POLL ? X-Git-Tag: rel-adns-0-3~1 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=adns.git;a=commitdiff_plain;h=16cf5367e3a455f322328315f3c13ed23d68b690 Compile without HAVE_POLL ? --- diff --git a/acconfig.h b/acconfig.h index 16672a6..ae59c59 100644 --- a/acconfig.h +++ b/acconfig.h @@ -39,6 +39,7 @@ #ifdef HAVE_POLL #include #else +/* kludge it up */ struct pollfd { int fd; short events; short revents; }; #define POLLIN 1 #define POLLPRI 2 diff --git a/client/adnstest.c b/client/adnstest.c index cbb896a..88875d2 100644 --- a/client/adnstest.c +++ b/client/adnstest.c @@ -27,13 +27,24 @@ #include #include #include -#include + +#include "adns.h" + +#include "config.h" #ifndef OUTPUTSTREAM # define OUTPUTSTREAM stdout #endif -#include "adns.h" +#ifndef HAVE_POLL +#undef poll +int poll(struct pollfd *ufds, int nfds, int timeout) { + fputs("poll(2) not supported on this system\n",stderr); + exit(3); +} +#define adns_beforepoll(a,b,c,d,e) 0 +#define adns_afterpoll(a,b,c,d) 0 +#endif static void failure_status(const char *what, adns_status st) { fprintf(stderr,"adns failure: %s: %s\n",what,adns_strerror(st));