aboutsummaryrefslogtreecommitdiffstats
path: root/tools/e2fsprogs
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-03-07 17:32:29 +0000
committerFelix Fietkau <nbd@openwrt.org>2013-03-07 17:32:29 +0000
commitcf3d83fe4a758c9fc0dc2e575b90c77f4fe18df8 (patch)
treee8523fabf4000faec51681f5e2c90940f9382291 /tools/e2fsprogs
parentd32fdeb4c0dc838022fc38b50191d482f2cca20c (diff)
downloadupstream-cf3d83fe4a758c9fc0dc2e575b90c77f4fe18df8.tar.gz
upstream-cf3d83fe4a758c9fc0dc2e575b90c77f4fe18df8.tar.bz2
upstream-cf3d83fe4a758c9fc0dc2e575b90c77f4fe18df8.zip
build: BSD compile fixes
following patch allows to build images for Qemu ARM on OpenBSD 5.2 amd64 and FreeBSD 9.1 amd64. Mostly small pieces of code changes to get things right on the specific platform. Updated the README to describe better, which tools on the host are required. Added some kind of prepare scripts to install needed tools on BSD via packages. Signed-off-by: Waldemar Brodkorb <mail@waldemar-brodkorb.de> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@35900 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'tools/e2fsprogs')
-rw-r--r--tools/e2fsprogs/patches/003-openbsd-compat.patch24
-rw-r--r--tools/e2fsprogs/patches/004-freebsd-compat.patch13
2 files changed, 37 insertions, 0 deletions
diff --git a/tools/e2fsprogs/patches/003-openbsd-compat.patch b/tools/e2fsprogs/patches/003-openbsd-compat.patch
new file mode 100644
index 0000000000..1f7cdca0e5
--- /dev/null
+++ b/tools/e2fsprogs/patches/003-openbsd-compat.patch
@@ -0,0 +1,24 @@
+diff -Nur e2fsprogs-1.42.7.orig/lib/blkid/getsize.c e2fsprogs-1.42.7/lib/blkid/getsize.c
+--- e2fsprogs-1.42.7.orig/lib/blkid/getsize.c Fri Nov 30 03:40:18 2012
++++ e2fsprogs-1.42.7/lib/blkid/getsize.c Thu Mar 7 14:21:59 2013
+@@ -26,6 +26,9 @@
+ #include <fcntl.h>
+ #ifdef HAVE_SYS_IOCTL_H
+ #include <sys/ioctl.h>
++#ifdef __OpenBSD__
++#include <sys/dkio.h>
++#endif
+ #endif
+ #ifdef HAVE_LINUX_FD_H
+ #include <linux/fd.h>
+diff -Nur e2fsprogs-1.42.7.orig/lib/quota/mkquota.c e2fsprogs-1.42.7/lib/quota/mkquota.c
+--- e2fsprogs-1.42.7.orig/lib/quota/mkquota.c Wed Jan 2 01:47:20 2013
++++ e2fsprogs-1.42.7/lib/quota/mkquota.c Thu Mar 7 14:21:59 2013
+@@ -8,6 +8,7 @@
+ #include <sys/stat.h>
+ #include <unistd.h>
+ #include <errno.h>
++#include <stdint.h>
+ #include <string.h>
+ #include <fcntl.h>
+
diff --git a/tools/e2fsprogs/patches/004-freebsd-compat.patch b/tools/e2fsprogs/patches/004-freebsd-compat.patch
new file mode 100644
index 0000000000..5eff49999e
--- /dev/null
+++ b/tools/e2fsprogs/patches/004-freebsd-compat.patch
@@ -0,0 +1,13 @@
+diff -Nur e2fsprogs-1.42.7.orig/lib/ext2fs/tdb.c e2fsprogs-1.42.7/lib/ext2fs/tdb.c
+--- e2fsprogs-1.42.7.orig/lib/ext2fs/tdb.c 2012-07-06 15:37:27.000000000 +0200
++++ e2fsprogs-1.42.7/lib/ext2fs/tdb.c 2013-03-07 14:54:59.000000000 +0100
+@@ -56,7 +56,9 @@
+ #include <utime.h>
+ #endif
+ #include <sys/stat.h>
++#ifndef __FreeBSD__
+ #include <sys/file.h>
++#endif
+ #include <fcntl.h>
+
+ #ifdef HAVE_SYS_MMAN_H