diff options
author | shaun <shaun@FreeBSD.org> | 2006-12-10 05:29:37 +0800 |
---|---|---|
committer | shaun <shaun@FreeBSD.org> | 2006-12-10 05:29:37 +0800 |
commit | b9be156f06d53ceb270cf592a7520292916bbe1d (patch) | |
tree | bfb568b76b72daca0ddd0a351b574dc2dcc107f3 /audio/gramofile | |
parent | 75285971cdbdefb7d4cbe140ded1d2e5d3d7515b (diff) | |
download | freebsd-ports-graphics-b9be156f06d53ceb270cf592a7520292916bbe1d.tar.gz freebsd-ports-graphics-b9be156f06d53ceb270cf592a7520292916bbe1d.tar.zst freebsd-ports-graphics-b9be156f06d53ceb270cf592a7520292916bbe1d.zip |
Fix build on sparc64.
PR: ports/106168
Submitted by: Juergen Lock <nox@jelal.kn-bremen.de> (maintainer)
Diffstat (limited to 'audio/gramofile')
-rw-r--r-- | audio/gramofile/Makefile | 2 | ||||
-rw-r--r-- | audio/gramofile/files/post-patch-bplay.c | 15 |
2 files changed, 15 insertions, 2 deletions
diff --git a/audio/gramofile/Makefile b/audio/gramofile/Makefile index 0dae5f5d6a0..58f494b37ed 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 c436d4421bf..04a41df49ab 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)) |