From b7f7542aa2393d479a1a5032076a759f8ab7c15f Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Tue, 29 Oct 2002 08:47:34 +0000
Subject: [PATCH] Deuce's mod: support for OpenBSD.

---
 src/xpdev/genwrap.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/xpdev/genwrap.c b/src/xpdev/genwrap.c
index c0bfc63696..79f05b578f 100644
--- a/src/xpdev/genwrap.c
+++ b/src/xpdev/genwrap.c
@@ -48,7 +48,7 @@
 	/* KIOCSOUND */
 	#if defined(__FreeBSD__)
 		#include <sys/kbio.h>
-	#else
+	#elif defined(__linux__)
 		#include <sys/kd.h>	
 	#endif
 #endif	/* __unix__ */
@@ -120,6 +120,7 @@ void DLLCALL unix_beep(int freq, int dur)
 {
 	static int console_fd=-1;
 
+#if !defined(__OpenBSD__)
 	if(console_fd == -1) 
   		console_fd = open("/dev/console", O_NOCTTY);
 	
@@ -128,6 +129,7 @@ void DLLCALL unix_beep(int freq, int dur)
 		SLEEP(dur);
 		ioctl(console_fd, KIOCSOUND, 0);	/* turn off tone */
 	}
+#endif
 }
 #endif
 
-- 
GitLab