$NetBSD: patch-aa,v 1.4 2013/08/15 09:45:58 richard Exp $
* configure OSS device name
* use config.h WORDS_BIGENDIAN macro
--- src/oss.c.orig 2011-02-09 21:02:40.000000000 +0000
+++ src/oss.c
@@ -21,10 +21,6 @@
.
***/
-#ifdef HAVE_CONFIG_H
-#include
-#endif
-
#include
#include
#include
@@ -38,6 +34,10 @@
#include
#include
+#ifdef HAVE_CONFIG_H
+#include
+#endif
+
#ifdef HAVE_MACHINE_SOUNDCARD_H
# include
#else
@@ -240,7 +240,7 @@ static int open_oss(ca_context *c, struc
* multichannel streams. We cannot support those files hence */
ca_return_val_if_fail(ca_sound_file_get_nchannels(out->file) <= 2, CA_ERROR_NOTSUPPORTED);
- if ((out->pcm = open(c->device ? c->device : "/dev/dsp", O_WRONLY | O_NONBLOCK, 0)) < 0)
+ if ((out->pcm = open(c->device ? c->device : DEVOSSAUDIO, O_WRONLY | O_NONBLOCK, 0)) < 0)
goto finish_errno;
if ((mode = fcntl(out->pcm, F_GETFL)) < 0)
@@ -259,7 +259,7 @@ static int open_oss(ca_context *c, struc
val = AFMT_S16_NE;
break;
case CA_SAMPLE_S16RE:
-#if __BYTE_ORDER == __LITTLE_ENDIAN
+#ifndef WORDS_BIGENDIAN
val = AFMT_S16_BE;
#else
val = AFMT_S16_LE;