summaryrefslogtreecommitdiff
path: root/audio/alsa-utils/patches/patch-ab
blob: f4e6289555ab07760bb625c1d3c738087a90e7f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
$NetBSD: patch-ab,v 1.1.1.1 2008/12/19 03:33:45 jmcneill 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>
+#ifdef __NetBSD__
+#include <sys/endian.h>
+#else
 #include <asm/byteorder.h>
+#endif
 #include "aconfig.h"
 #include "gettext.h"
 #include "formats.h"
@@ -55,6 +59,17 @@
 #define LLONG_MAX    9223372036854775807LL
 #endif
 
+#ifdef __NetBSD__
+#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
+#endif
+
 #define DEFAULT_FORMAT		SND_PCM_FORMAT_U8
 #define DEFAULT_SPEED 		8000