$NetBSD: patch-ac,v 1.2 2006/06/06 15:48:34 joerg Exp $ --- src/hostapi/oss/pa_unix_oss.c.orig 2006-05-17 08:02:24.000000000 +0000 +++ src/hostapi/oss/pa_unix_oss.c @@ -42,7 +42,9 @@ #include #include #include +#if !defined(__NetBSD__) && !defined(__DragonFly__) #include +#endif #include #include #include @@ -52,12 +54,15 @@ #include #include -#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__DragonFly__) # include # define DEVICE_NAME_BASE "/dev/dsp" #elif defined __linux__ # include # define DEVICE_NAME_BASE "/dev/dsp" +#elif defined(__NetBSD__) +# include +# define DEVICE_NAME_BASE "/dev/audio" #else # include /* JH20010905 */ # define DEVICE_NAME_BASE "/dev/audio" @@ -1916,8 +1921,10 @@ static signed long GetStreamWriteAvailab PaOssStream *stream = (PaOssStream*)s; int delay = 0; +#if !defined(__NetBSD__) if( ioctl( stream->playback->fd, SNDCTL_DSP_GETODELAY, &delay ) < 0 ) return paUnanticipatedHostError; +#endif return (PaOssStreamComponent_BufferSize( stream->playback ) - delay) / PaOssStreamComponent_FrameSize( stream->playback ); }