aboutsummaryrefslogtreecommitdiff
path: root/include/u.h
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-03-28 15:58:14 +0000
committerrsc <devnull@localhost>2005-03-28 15:58:14 +0000
commit5ba33c04daeca7f84d0d0148725e593a0c672343 (patch)
tree74897b34527eaa3d3ea8ddb93973c133222a705b /include/u.h
parentbe9e0e98579e6dec33814f1074d22943eb87ef2b (diff)
downloadplan9port-5ba33c04daeca7f84d0d0148725e593a0c672343.tar.gz
plan9port-5ba33c04daeca7f84d0d0148725e593a0c672343.tar.bz2
plan9port-5ba33c04daeca7f84d0d0148725e593a0c672343.zip
NetBSD support. Thanks to Christoph Lohmann.
Diffstat (limited to 'include/u.h')
-rw-r--r--include/u.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/u.h b/include/u.h
index 54f4df59..84cd78d0 100644
--- a/include/u.h
+++ b/include/u.h
@@ -8,6 +8,7 @@ extern "C" {
#define __EXTENSIONS__ 1 /* SunOS */
/* NOT USING #define __MAKECONTEXT_V2_SOURCE 1 / * SunOS */
#define _BSD_SOURCE 1
+#define _NETBSD_SOURCE 1 /* NetBSD */
#define _SVID_SOURCE 1
#define _XOPEN_SOURCE 1000
#define _XOPEN_SOURCE_EXTENDED 1
@@ -74,6 +75,13 @@ typedef long p9jmp_buf[sizeof(sigjmp_buf)/sizeof(long)];
# undef _NEEDUSHORT
# undef _NEEDUINT
# define _NEEDLL 1
+#elif defined(__NetBSD__)
+# include <sched.h>
+# include <sys/types.h>
+# undef _NEEDUSHORT
+# undef _NEEDUINT
+# undef _NEEDULONG
+# undef PLAN9PORT_USING_PTHREADS
#else
/* No idea what system this is -- try some defaults */
# include <pthread.h>