From 1923b3d692ef257e1a81d4e92912b45bd2f5696b Mon Sep 17 00:00:00 2001 From: nico Date: Sat, 6 Apr 2013 22:57:17 +0000 Subject: [PATCH] [packages] xmail: fix endianness detection * fix endianness detection (closes: #9913) * bump release number git-svn-id: svn://svn.openwrt.org/openwrt/packages@36236 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- mail/xmail/Makefile | 4 ++-- mail/xmail/patches/030-sysmachine.patch | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/mail/xmail/Makefile b/mail/xmail/Makefile index e756c058b..2e3cc2628 100644 --- a/mail/xmail/Makefile +++ b/mail/xmail/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2007-2012 OpenWrt.org +# Copyright (C) 2007-2013 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=xmail PKG_VERSION:=1.26 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.xmailserver.org/ diff --git a/mail/xmail/patches/030-sysmachine.patch b/mail/xmail/patches/030-sysmachine.patch index b3704fbbc..c181e1276 100644 --- a/mail/xmail/patches/030-sysmachine.patch +++ b/mail/xmail/patches/030-sysmachine.patch @@ -1,14 +1,20 @@ diff -urN xmail-1.25.orig/SysMachine.h xmail-1.25/SysMachine.h --- xmail-1.25.orig/SysMachine.h 1970-01-01 01:00:00.000000000 +0100 +++ xmail-1.25/SysMachine.h 2008-07-28 10:16:47.000000000 +0200 -@@ -0,0 +1,24 @@ +@@ -0,0 +1,30 @@ +#ifndef _MACHDEFS_H +#define _MACHDEFS_H + + -+#undef MACH_BIG_ENDIAN_WORDS ++#include + ++#if __BYTE_ORDER == __LITTLE_ENDIAN ++#undef MACH_BIG_ENDIAN_WORDS +#undef MACH_BIG_ENDIAN_BITFIELD ++#elif __BYTE_ORDER == __BIG_ENDIAN ++#define MACH_BIG_ENDIAN_WORDS ++#define MACH_BIG_ENDIAN_BITFIELD ++#endif + +typedef signed char MachInt8; +typedef unsigned char MachUInt8;