From owner-freebsd-ppc@FreeBSD.ORG Sun Oct 23 22:40:02 2011 Return-Path: Delivered-To: freebsd-ppc@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4EDB61065675 for ; Sun, 23 Oct 2011 22:40:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 295008FC0C for ; Sun, 23 Oct 2011 22:40:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p9NMe2Lv040222 for ; Sun, 23 Oct 2011 22:40:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p9NMe2mD040221; Sun, 23 Oct 2011 22:40:02 GMT (envelope-from gnats) Resent-Date: Sun, 23 Oct 2011 22:40:02 GMT Resent-Message-Id: <201110232240.p9NMe2mD040221@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ppc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Rich Healey Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF1B9106566C for ; Sun, 23 Oct 2011 22:34:39 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id DF54D8FC08 for ; Sun, 23 Oct 2011 22:34:39 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p9NMYdMG047407 for ; Sun, 23 Oct 2011 22:34:39 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id p9NMYdJe047406; Sun, 23 Oct 2011 22:34:39 GMT (envelope-from nobody) Message-Id: <201110232234.p9NMYdJe047406@red.freebsd.org> Date: Sun, 23 Oct 2011 22:34:39 GMT From: Rich Healey To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: powerpc/161947: multimedia/libdvdnav builds broken binaries on big endian machines X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Oct 2011 22:40:02 -0000 >Number: 161947 >Category: powerpc >Synopsis: multimedia/libdvdnav builds broken binaries on big endian machines >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ppc >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Oct 23 22:40:01 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Rich Healey >Release: 10-current >Organization: psych0tik.net >Environment: >Description: > I tried to use vlc to play a dvd on -CURRENT but it fails with > > libdvdnav: vm: ifoRead_FP_PGC failed > > Googling, I found a patch from debian bugtracker at > > http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=25;filename=05-endian.patch;att=1;bug=531621 > > Which I adjusted for FreeBSD (changed patch to source file and path to > include file) > > Can this be included in ports? >How-To-Repeat: >Fix: Attached patch will reverse the word byte order if the machine is bigendian. Patch attached with submission follows: Index: src/bswap.h =================================================================== --- src/bswap.h 2009-06-04 12:32:25.000000000 -0700 +++ src/bswap.h 2009-06-04 12:32:59.000000000 -0700 @@ -20,6 +20,11 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include +#if BYTE_ORDER == BIG_ENDIAN +#define WORDS_BIGENDIAN +#endif + #include #if defined(WORDS_BIGENDIAN) >Release-Note: >Audit-Trail: >Unformatted: