$OpenBSD: patch-w_keyboard_c,v 1.3 2016/03/05 17:41:43 sthen Exp $
--- w_keyboard.c.pat.orig	Fri Sep 30 20:27:36 2011
+++ w_keyboard.c	Thu Jan 28 12:51:55 2016
@@ -17,8 +17,9 @@
  */
 
 #include <sys/types.h>
+#include <stdlib.h>
 #include <regex.h>
-#ifndef __FreeBSD__
+#if !defined(__FreeBSD__) && !defined(__OpenBSD__)
 #include <alloca.h>
 #endif
 #include <string.h>
@@ -41,7 +42,8 @@
 #define REG_NOERROR 0
 #endif
 
-#if defined(__FreeBSD__) && !defined(REG_NOERROR)
+#if defined(__FreeBSD__) || defined(__OpenBSD__) \
+	&& !defined(REG_NOERROR)
 #define REG_NOERROR 0
 #endif
 
