pkgsrc/games/plib/patches/patch-ae
ryoon c52272e75a Fix build on OpenBSD/amd64 5.2.
The patches are taken from OpenBSD ports repository.

* Disable joystick on OpenBSD/!i386
* Use sndio on OpenBSD
2013-01-06 00:59:46 +00:00

39 lines
1.1 KiB
Text

$NetBSD: patch-ae,v 1.4 2013/01/06 00:59:47 ryoon Exp $
--- src/sl/sl.h.orig Tue Mar 11 02:06:24 2008
+++ src/sl/sl.h
@@ -26,12 +26,15 @@
#define __SL_H__ 1
#include <stdio.h>
+#include <sys/ioctl.h>
#include "slPortability.h"
#ifdef SL_USING_OSS_AUDIO
#define SLDSP_DEFAULT_DEVICE "/dev/dsp"
#elif defined(UL_WIN32)
#define SLDSP_DEFAULT_DEVICE "dsp"
+#elif defined(SL_USING_SNDIO)
+#define SLDSP_DEFAULT_DEVICE "default"
#elif defined(UL_BSD)
#define SLDSP_DEFAULT_DEVICE "/dev/audio"
#elif defined(UL_IRIX)
@@ -78,6 +81,9 @@ class slDSP (private)
#if defined(SL_USING_OSS_AUDIO)
audio_buf_info buff_info ;
+#elif defined(SL_USING_SNDIO)
+ struct sio_hdl *hdl;
+ struct sio_par par;
#elif defined(UL_BSD)
audio_info_t ainfo; // ioctl structure
audio_offset_t audio_offset; // offset in audiostream
@@ -120,7 +126,7 @@ class slDSP (private)
#endif
-#if !defined(UL_WIN32) && !defined(UL_MACINTOSH) && !defined(UL_MAC_OSX)
+#if !defined(UL_WIN32) && !defined(UL_MACINTOSH) && !defined(UL_MAC_OSX) && !defined(SL_USING_SNDIO)
int ioctl ( int cmd, int param = 0 )
{
if ( error ) return param ;