summaryrefslogtreecommitdiff
path: root/emulators/fmsx/patches/patch-ab
blob: 8914b46b7a62937806e55220cb26e664c68cd8ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
$NetBSD: patch-ab,v 1.4 2006/01/15 19:32:44 joerg Exp $

--- SndUnix.c.orig	2001-03-07 19:15:16.000000000 +0000
+++ SndUnix.c
@@ -31,7 +31,9 @@
 
 #include <sys/audioio.h>
 #include <sys/conf.h>
+#ifndef __NetBSD__
 #include <stropts.h>
+#endif
 
 #define AUDIO_CONV(A) (ULAW[0xFF&(128+(A))]) 
 
@@ -73,15 +75,11 @@ static unsigned char ULAW[256] =
 
 #else /* SUN_AUDIO */
 
-#ifdef __FreeBSD__
-#include <machine/soundcard.h>
-#endif
- 
 #ifdef __NetBSD__
 #include <soundcard.h>
 #endif
  
-#ifdef __linux__
+#if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__linux__)
 #include <sys/soundcard.h>
 #endif
     
@@ -236,7 +234,7 @@ static void SoundSignal(int SIG)
     case SIGUSR1:
       /* Suspend execution, until SIGUSR2 catched */
 #ifndef SUN_AUDIO
-      ioctl(SoundFD,SNDCTL_DSP_RESET);
+      ioctl(SoundFD,SNDCTL_DSP_RESET,1);
 #endif
       close(SoundFD);
       for(Suspended=1;Suspended;pause());