tools: Fix compilation on x32 host
[openwrt.git] / tools / mtd-utils / patches / 110-portability.patch
index 5bf1b95..727c0e6 100644 (file)
  #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