ports/106168: fix audio/gramofile on sparc64

Juergen Lock nox at jelal.kn-bremen.de
Sat Dec 2 00:50:04 UTC 2006


>Number:         106168
>Category:       ports
>Synopsis:       fix audio/gramofile on sparc64
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec 02 00:50:02 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Juergen Lock
>Release:        FreeBSD 6.1-RELEASE-p5 i386
>Organization:
me?  organized??
>Environment:
System: FreeBSD saturn 6.1-RELEASE-p5 FreeBSD 6.1-RELEASE-p5 #0: Mon Sep 4 15:37:14 CEST 2006 nox at saturn:/ad4/usr/home/nox/src61/src/sys/i386/compile/GENERICua i386


>Description:
	this seems to be the fix for the sparc64 build problem, only
	I cant test it.  So please test (and commit if it works),
	thanx!

>How-To-Repeat:
	http://pointyhat.freebsd.org/errorlogs/sparc64-errorlogs/e.6.2006113004/gramofile-1.6P_7.log

>Fix:

Index: files/post-patch-bplay.c
===================================================================
RCS file: /home/ncvs/ports/audio/gramofile/files/post-patch-bplay.c,v
retrieving revision 1.1
diff -u -r1.1 post-patch-bplay.c
--- files/post-patch-bplay.c	2 Nov 2005 05:25:44 -0000	1.1
+++ files/post-patch-bplay.c	1 Dec 2006 23:16:20 -0000
@@ -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 @@
  
  /* 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))
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list