pkgsrc/games/xdoom/patches/patch-ay
wiz 5ea5107654 Re-add xdoom, requested by drochner.
Address PR 24024 by marking it as not-for-lp64platforms.
2010-02-22 21:58:47 +00:00

42 lines
929 B
Text

$NetBSD: patch-ay,v 1.5 2010/02/22 21:58:48 wiz Exp $
--- sndserv/linux.c.orig Sun Jan 26 07:45:01 1997
+++ sndserv/linux.c Thu Feb 3 01:34:05 2000
@@ -36,13 +36,17 @@ static const char rcsid[] = "$Id: linux.
+#include <errno.h>
#include <stdlib.h>
#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;
@@ -54,5 +58,4 @@ myioctl
{
int rc;
- extern int errno;
rc = ioctl(fd, command, arg);
@@ -77,7 +80,10 @@ I_InitSound
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);
+ }