diff options
author | rsc <devnull@localhost> | 2005-05-01 18:40:01 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2005-05-01 18:40:01 +0000 |
commit | 52e6164443782187e17e22f7ccddd0d9a25006e4 (patch) | |
tree | 20706d2a7ded04fd76ec0207736d1051a1dd393e /include | |
parent | cea10000c59882b43525e4fd4fb17a55b7dba1c1 (diff) | |
download | plan9port-52e6164443782187e17e22f7ccddd0d9a25006e4.tar.gz plan9port-52e6164443782187e17e22f7ccddd0d9a25006e4.tar.bz2 plan9port-52e6164443782187e17e22f7ccddd0d9a25006e4.zip |
OpenBSD support.
Diffstat (limited to 'include')
-rw-r--r-- | include/libc.h | 6 | ||||
-rw-r--r-- | include/u.h | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/include/libc.h b/include/libc.h index ac8ffa9d..88382c15 100644 --- a/include/libc.h +++ b/include/libc.h @@ -638,7 +638,7 @@ extern void freenetconninfo(NetConnInfo*); #define DMWRITE 0x2 /* mode bit for write permission */ #define DMEXEC 0x1 /* mode bit for execute permission */ -#if defined(__FreeBSD__) +#ifdef RFMEM /* FreeBSD, OpenBSD */ #undef RFFDG #undef RFNOTEG #undef RFPROC @@ -832,6 +832,10 @@ extern int post9pservice(int, char*); # endif #endif +#ifdef __OpenBSD__ +#define sched_yield() syscall(302) /* what is this? */ +#endif + /* command line */ extern char *argv0; extern void __fixargv0(void); diff --git a/include/u.h b/include/u.h index 84cd78d0..ccadff00 100644 --- a/include/u.h +++ b/include/u.h @@ -81,7 +81,10 @@ typedef long p9jmp_buf[sizeof(sigjmp_buf)/sizeof(long)]; # undef _NEEDUSHORT # undef _NEEDUINT # undef _NEEDULONG -# undef PLAN9PORT_USING_PTHREADS +#elif defined(__OpenBSD__) +# undef _NEEDUSHORT +# undef _NEEDUINT +# undef _NEEDULONG #else /* No idea what system this is -- try some defaults */ # include <pthread.h> |