summaryrefslogtreecommitdiff
path: root/games/xdoom/patches/patch-ay
blob: 64f500753c5d892d31c2256396eec623fc56e4ab (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
$NetBSD: patch-ay,v 1.2 2005/02/24 23:04:31 minskim Exp $

--- sndserv/linux.c.orig	Sun Jan 26 07:45:01 1997
+++ sndserv/linux.c	Thu Feb  3 01:34:05 2000
@@ -39,11 +39,14 @@
 #include <stdio.h>
 #include <fcntl.h>
 #include <unistd.h>
+#include <sys/ioctl.h>
 
-#include <linux/soundcard.h>
+#include <sys/soundcard.h>
 
 #include "soundsrv.h"
 
+#define SOUND_DEV "/dev/sound"
+
 int	audio_fd;
 
 void
@@ -76,9 +79,12 @@
 
     int i;
                 
-    audio_fd = open("/dev/dsp", O_WRONLY);
+    audio_fd = open(SOUND_DEV, O_WRONLY);
     if (audio_fd<0)
-        fprintf(stderr, "Could not open /dev/dsp\n");
+    {
+        perror("sndserv: Could not open "SOUND_DEV);
+	exit(-1);
+    }
          
                      
     i = 11 | (2<<16);