Index: common/compat.c
--- common/compat.c.orig
+++ common/compat.c
@@ -53,6 +53,9 @@
 #undef __BSD_VISIBLE
 #define __BSD_VISIBLE 1
 #endif
+#ifdef __OpenBSD__
+#define _BSD_SOURCE
+#endif
 
 #include "compat.h"
 #include "debug.h"
