pkgsrc/games/xdoom/patches/patch-ay
2005-02-24 23:04:31 +00:00

35 lines
797 B
Text

$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);