40 lines
969 B
Plaintext
40 lines
969 B
Plaintext
$NetBSD: patch-ab,v 1.3 2012/02/15 19:46:31 hans Exp $
|
|
|
|
--- aplay/aplay.c.orig 2008-12-18 22:21:06.000000000 -0500
|
|
+++ aplay/aplay.c
|
|
@@ -45,7 +45,11 @@
|
|
#include <sys/uio.h>
|
|
#include <sys/time.h>
|
|
#include <sys/signal.h>
|
|
+#if defined(__NetBSD__) || defined(__DragonFly__)
|
|
+#include <sys/endian.h>
|
|
+#else
|
|
#include <asm/byteorder.h>
|
|
+#endif
|
|
#include "aconfig.h"
|
|
#include "gettext.h"
|
|
#include "formats.h"
|
|
@@ -55,6 +59,22 @@
|
|
#define LLONG_MAX 9223372036854775807LL
|
|
#endif
|
|
|
|
+#if defined(__NetBSD__) || defined(__DragonFly__)
|
|
+#define open64 open
|
|
+#define lseek64 lseek
|
|
+#define off64_t off_t
|
|
+#define ESTRPIPE EPIPE
|
|
+#define __le16_to_cpu le16toh
|
|
+#define __le32_to_cpu le32toh
|
|
+#define __be16_to_cpu be16toh
|
|
+#define __be32_to_cpu be32toh
|
|
+#elif defined(__sun)
|
|
+#define __le16_to_cpu LE_16
|
|
+#define __le32_to_cpu LE_32
|
|
+#define __be16_to_cpu BE_16
|
|
+#define __be32_to_cpu BE_32
|
|
+#endif
|
|
+
|
|
#define DEFAULT_FORMAT SND_PCM_FORMAT_U8
|
|
#define DEFAULT_SPEED 8000
|
|
|