no stdint
diff --git a/include/u.h b/include/u.h
index e5aeae5..0a696ce 100644
--- a/include/u.h
+++ b/include/u.h
@@ -10,14 +10,14 @@
 #define _BSD_SOURCE 1
 #define _NETBSD_SOURCE 1	/* NetBSD */
 #define _SVID_SOURCE 1
-#ifndef __APPLE__
+#if !defined(__APPLE__) && !defined(__OpenBSD__)
 #	define _XOPEN_SOURCE 1000
 #	define _XOPEN_SOURCE_EXTENDED 1
 #endif
 #define _LARGEFILE64_SOURCE 1
 #define _FILE_OFFSET_BITS 64
 
-#include <stdint.h>
+#include <inttypes.h>
 
 #include <unistd.h>
 #include <string.h>
@@ -95,9 +95,11 @@
 #	undef _NEEDULONG
 #elif defined(__OpenBSD__)
 #	include <sys/types.h>
+#	include <pthread.h>
 #	undef _NEEDUSHORT
 #	undef _NEEDUINT
 #	undef _NEEDULONG
+#	define PLAN9PORT_USING_PTHREADS 1
 #else
 	/* No idea what system this is -- try some defaults */
 #	include <pthread.h>