OpenBSD support.
diff --git a/include/libc.h b/include/libc.h
index ac8ffa9..88382c1 100644
--- a/include/libc.h
+++ b/include/libc.h
@@ -638,7 +638,7 @@
#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 @@
# 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 84cd78d..ccadff0 100644
--- a/include/u.h
+++ b/include/u.h
@@ -81,7 +81,10 @@
# 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>