$NetBSD: patch-ac,v 1.2 2007/07/31 10:17:38 joerg Exp $ --- xbreaky.snd.c.orig 2000-05-11 08:13:45.000000000 +0000 +++ xbreaky.snd.c @@ -20,7 +20,7 @@ */ #include <stdio.h> -#include <malloc.h> +#include <stdlib.h> #include <unistd.h> #include <stdlib.h> #include <getopt.h> @@ -28,11 +28,19 @@ #include <string.h> #include <strings.h> #include <signal.h> +#ifdef __NetBSD__ +#include <soundcard.h> +#else #include <sys/soundcard.h> +#endif #include <sys/ioctl.h> #define DEFAULT_DSP_SPEED 8000 +#ifdef __NetBSD__ +#define AUDIO "/dev/audio" +#else #define AUDIO "/dev/dsp" +#endif #define RAWFILESDIR PREFIX"/share/games/xbreaky" int timelimit = 0, dsp_speed = DEFAULT_DSP_SPEED, dsp_stereo = 0; @@ -53,7 +61,6 @@ int main (int argc, char *argv[]) char k; signal(SIGTERM, quit); - fcntl(STDIN_FILENO,F_SETFL,O_NONBLOCK); audio = open (AUDIO, O_WRONLY, 0); if (audio == -1) { @@ -101,7 +108,7 @@ int main (int argc, char *argv[]) } if(i!=-1) { - play(names[(int)k]); + play(names[(int)k & 1]); } }