summaryrefslogtreecommitdiffstats
path: root/tools/mtd-utils
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-10-25 16:57:16 +0000
committerFelix Fietkau <nbd@openwrt.org>2014-10-25 16:57:16 +0000
commitdd86bc73fb894a259bf8eca38c074128ad2eb40f (patch)
tree0c7d683eb56d86d604bb2021979b0ca2392f27cd /tools/mtd-utils
parent3c9fcd2526e8a25a618851453ceb6a63e83c53b3 (diff)
downloadmaster-31e0f0ae-dd86bc73fb894a259bf8eca38c074128ad2eb40f.tar.gz
master-31e0f0ae-dd86bc73fb894a259bf8eca38c074128ad2eb40f.tar.bz2
master-31e0f0ae-dd86bc73fb894a259bf8eca38c074128ad2eb40f.zip
tools: Fix compilation on x32 host
Compiling the host tools on the new x32 architecture (which is an ILP32 ELF32 system on an amd64 CPU) fails for various reasons. gmp: pull same fix I applied to OpenADK, which was inspired by the fix in the Debian source package mtd-utils: write a workaround myself; only affects x32, but the use of llseek is dangerous according to the manpage, so the guard ifdef should probably go away findutils: pull fix straight from the Debian source packae Signed-off-by: Thorsten Glaser <tg@mirbsd.org> SVN-Revision: 43060
Diffstat (limited to 'tools/mtd-utils')
-rw-r--r--tools/mtd-utils/patches/110-portability.patch5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/mtd-utils/patches/110-portability.patch b/tools/mtd-utils/patches/110-portability.patch
index 5bf1b95bc2..727c0e6c59 100644
--- a/tools/mtd-utils/patches/110-portability.patch
+++ b/tools/mtd-utils/patches/110-portability.patch
@@ -50,12 +50,15 @@
#define UBI_VERSION 1
--- a/mkfs.ubifs/mkfs.ubifs.h
+++ b/mkfs.ubifs/mkfs.ubifs.h
-@@ -34,7 +34,14 @@
+@@ -34,7 +34,17 @@
#include <endian.h>
#include <byteswap.h>
#include <linux/types.h>
+#ifdef __linux__
#include <linux/fs.h>
++# if defined(__x86_64__) && defined(__ILP32__)
++# define llseek lseek64
++# endif
+#else
+# ifndef O_LARGEFILE
+# define O_LARGEFILE 0