diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-05-05 01:01:34 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-05-05 01:01:34 +0000 |
commit | d49d3dcc7bc19e9b9fb2aa29f7d94379a8aedf52 (patch) | |
tree | 92abedc5551581dc6e80546216a78ce96f6ec312 /src/common/fakepoll.h | |
parent | 608c15682049ee375f81655625b9f85d6a600a1a (diff) | |
download | tor-d49d3dcc7bc19e9b9fb2aa29f7d94379a8aedf52.tar.gz tor-d49d3dcc7bc19e9b9fb2aa29f7d94379a8aedf52.zip |
Make non-fake tor_poll robust against -1 fds
svn:r1787
Diffstat (limited to 'src/common/fakepoll.h')
-rw-r--r-- | src/common/fakepoll.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/common/fakepoll.h b/src/common/fakepoll.h index 4d0d9ce524..783aff0c42 100644 --- a/src/common/fakepoll.h +++ b/src/common/fakepoll.h @@ -19,15 +19,11 @@ * select. On Mac OS 10.3, this wrapper is kinda flaky, and we should * use our own. */ -#if (defined(HAVE_POLL_H)||defined(HAVE_SYS_POLL_H)) && !defined(_POLL_EMUL_H_) -#define tor_poll poll -#else +#if !(defined(HAVE_POLL_H)||defined(HAVE_SYS_POLL_H))&&!defined(_POLL_EMUL_H_) #define USE_FAKE_POLL #endif -#ifdef USE_FAKE_POLL - -#ifndef _POLL_EMUL_H_ +#if defined USE_FAKE_POLL && !defined(_POLL_EMUL_H_) struct pollfd { int fd; short events; @@ -43,7 +39,6 @@ struct pollfd { #endif int tor_poll(struct pollfd *ufds, unsigned int nfds, int timeout); -#endif #endif |