summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%netscape.com <devnull@localhost>1998-09-29 14:28:25 +0000
committerwtc%netscape.com <devnull@localhost>1998-09-29 14:28:25 +0000
commit73cf6d918ed1660aaa68ec59284baea0882aef8d (patch)
tree3b22c97fa6dd347b482e82195f7a569eb96d43ea
parent72acdb3e715f567affc3eb5563c205e4fbe57d21 (diff)
downloadnspr-hg-73cf6d918ed1660aaa68ec59284baea0882aef8d.tar.gz
Fixed Linux pthreads build breakage. Define _PR_POLL_AVAILABLE on
glibc systems.
-rw-r--r--pr/include/md/_linux.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/pr/include/md/_linux.h b/pr/include/md/_linux.h
index cfbecc70..5bb3a451 100644
--- a/pr/include/md/_linux.h
+++ b/pr/include/md/_linux.h
@@ -20,7 +20,6 @@
#define nspr_linux_defs_h___
#include "prthread.h"
-#include <sys/time.h>
/*
* Internal configuration macros
@@ -65,7 +64,9 @@
#endif
#define USE_SETJMP
-#undef _PR_POLL_AVAILABLE
+#if defined(__GLIBC__) && __GLIBC__ >= 2
+#define _PR_POLL_AVAILABLE
+#endif
#undef _PR_USE_POLL
#define _PR_STAT_HAS_ONLY_ST_ATIME
#if defined(__alpha)
@@ -294,6 +295,7 @@ struct _MDSegment {
/*
* md-specific cpu structure field
*/
+#include <sys/time.h> /* for FD_SETSIZE */
#define _PR_MD_MAX_OSFD FD_SETSIZE
struct _MDCPU_Unix {
@@ -379,7 +381,7 @@ extern PRIntervalTime _PR_UNIX_TicksPerSecond(void);
#define _MD_SELECT __select
#ifdef _PR_POLL_AVAILABLE
-#include <poll.h>
+#include <sys/poll.h>
extern int __syscall_poll(struct pollfd *ufds, unsigned long int nfds,
int timeout);
#define _MD_POLL __syscall_poll