[packages] xmail: fix endianness detection
authornico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 6 Apr 2013 22:57:17 +0000 (22:57 +0000)
committernico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 6 Apr 2013 22:57:17 +0000 (22:57 +0000)
 * 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
mail/xmail/patches/030-sysmachine.patch

index e756c05..2e3cc26 100644 (file)
@@ -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/
index b3704fb..c181e12 100644 (file)
@@ -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 <endian.h>
 +
++#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;