aboutsummaryrefslogtreecommitdiff
path: root/audio/gramofile
diff options
context:
space:
mode:
authorShaun Amott <shaun@FreeBSD.org>2006-12-09 21:29:37 +0000
committerShaun Amott <shaun@FreeBSD.org>2006-12-09 21:29:37 +0000
commitaa91eaa5703df6099e8ae3936b97747c0843e854 (patch)
treee4c6d2eaf5f68e05aebd2a256d76ee3fd9adf3a9 /audio/gramofile
parenta1767758f3b3ec8205032c31a9b806f4f7782f39 (diff)
Notes
Diffstat (limited to 'audio/gramofile')
-rw-r--r--audio/gramofile/Makefile2
-rw-r--r--audio/gramofile/files/post-patch-bplay.c15
2 files changed, 15 insertions, 2 deletions
diff --git a/audio/gramofile/Makefile b/audio/gramofile/Makefile
index 0dae5f5d6a06..58f494b37eda 100644
--- a/audio/gramofile/Makefile
+++ b/audio/gramofile/Makefile
@@ -35,7 +35,7 @@ USE_PERL5= yes
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 500000
-IGNORE= Doesn't work on 4.x: Missing SHM_LOCK
+IGNORE= doesn't work on 4.x: Missing SHM_LOCK
.endif
.if ${PERL_LEVEL} < 500600
diff --git a/audio/gramofile/files/post-patch-bplay.c b/audio/gramofile/files/post-patch-bplay.c
index c436d4421bf5..04a41df49ab3 100644
--- a/audio/gramofile/files/post-patch-bplay.c
+++ b/audio/gramofile/files/post-patch-bplay.c
@@ -1,5 +1,5 @@
Index: bplaysrc/bplay.c
-@@ -33,14 +33,16 @@
+@@ -33,23 +33,30 @@
/* Needed for BYTE_ORDER and BIG/LITTLE_ENDIAN macros. */
#ifndef _BSD_SOURCE
# define _BSD_SOURCE
@@ -17,3 +17,16 @@ Index: bplaysrc/bplay.c
/* Adapted from the byteorder macros in the Linux kernel. */
#if BYTE_ORDER == LITTLE_ENDIAN
+ #define cpu_to_le32(x) (x)
+ #define cpu_to_le16(x) (x)
+ #else
++#ifdef __FreeBSD__
++#define cpu_to_le32(x) bswap32((x))
++#define cpu_to_le16(x) bswap16((x))
++#else
+ #define cpu_to_le32(x) bswap_32((x))
+ #define cpu_to_le16(x) bswap_16((x))
++#endif
+ #endif
+
+ #define le32_to_cpu(x) cpu_to_le32((x))