$NetBSD: patch-ay,v 1.3 2006/01/13 00:04:16 joerg 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 #include #include #include #include +#include -#include +#include #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); + }