[packages] xmail: fix endianness detection
authorNicolas Thill <nico@openwrt.org>
Sat, 6 Apr 2013 22:57:17 +0000 (22:57 +0000)
committerNicolas Thill <nico@openwrt.org>
Sat, 6 Apr 2013 22:57:17 +0000 (22:57 +0000)
 * fix endianness detection (closes: #9913)
 * bump release number

SVN-Revision: 36236

mail/xmail/Makefile
mail/xmail/patches/030-sysmachine.patch

index e756c058b6674f37188e78a8bf555775ebcd0890..2e3cc26287ba51f639fde1b1d19f97e2045a8c7d 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 b3704fbbc34d7e8175ab35b37ccedbfc32b4cd26..c181e12766eb2d54f6b1588f7e52d68047a5f4b3 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;