chiark
/
gitweb
/
~mdw
/
adns
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
02b47fa
)
Compile without HAVE_POLL ?
author
ian
<ian>
Wed, 14 Jul 1999 22:59:34 +0000
(22:59 +0000)
committer
ian
<ian>
Wed, 14 Jul 1999 22:59:34 +0000
(22:59 +0000)
acconfig.h
patch
|
blob
|
blame
|
history
client/adnstest.c
patch
|
blob
|
blame
|
history
diff --git
a/acconfig.h
b/acconfig.h
index 16672a6689bb91e564fb3828201e8332f2c21b43..ae59c59ed9a47b37838a49232e4c44f9a92b72c0 100644
(file)
--- a/
acconfig.h
+++ b/
acconfig.h
@@
-39,6
+39,7
@@
#ifdef HAVE_POLL
#include <sys/poll.h>
#else
#ifdef HAVE_POLL
#include <sys/poll.h>
#else
+/* kludge it up */
struct pollfd { int fd; short events; short revents; };
#define POLLIN 1
#define POLLPRI 2
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 cbb896a2a5b5b39afe25162ddd1e353506e172b6..88875d2c43eabd767acce5e15b66cb33150313ee 100644
(file)
--- a/
client/adnstest.c
+++ b/
client/adnstest.c
@@
-27,13
+27,24
@@
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
-#include <sys/poll.h>
+
+#include "adns.h"
+
+#include "config.h"
#ifndef OUTPUTSTREAM
# define OUTPUTSTREAM stdout
#endif
#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));
static void failure_status(const char *what, adns_status st) {
fprintf(stderr,"adns failure: %s: %s\n",what,adns_strerror(st));