From d9525f0161d9885007a8b0ff68829afa860737fc Mon Sep 17 00:00:00 2001 From: AliceLR Date: Mon, 25 Jul 2022 22:03:20 -0600 Subject: [PATCH] Fix NetBSD driver compile error and OSS link error. --- configure.ac | 3 +++ src/sound_netbsd.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 8ed725d..bfc4dfa 100644 --- a/configure.ac +++ b/configure.ac @@ -193,6 +193,9 @@ netbsd*) AC_DEFINE(SOUND_NETBSD, 1, [ ]) AM_CONDITIONAL([SOUND_NETBSD], [true]) fi + if test "${ac_cv_header_sys_soundcard_h}" = "yes"; then + AC_CHECK_LIB(ossaudio, _oss_ioctl) + fi ;; solaris*) if test "${ac_cv_header_sys_audioio_h}" = "yes"; then diff --git a/src/sound_netbsd.c b/src/sound_netbsd.c index 28bf552..32342af 100644 --- a/src/sound_netbsd.c +++ b/src/sound_netbsd.c @@ -101,7 +101,7 @@ static void play(void *b, int i) while (i) { if ((j = write(audio_fd, b, i)) > 0) { i -= j; - (char *)b += j; + b = (char *)b + j; } else break; }