aboutsummaryrefslogtreecommitdiffstats
path: root/tools/yaffs2
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/yaffs2
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/yaffs2')
-rw-r--r--tools/yaffs2/patches/110-openbsd-compat.patch14
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/yaffs2/patches/110-openbsd-compat.patch b/tools/yaffs2/patches/110-openbsd-compat.patch
new file mode 100644
index 0000000000..cfafc1ca7e
--- /dev/null
+++ b/tools/yaffs2/patches/110-openbsd-compat.patch
@@ -0,0 +1,14 @@
+diff -Nur yaffs2_android.orig/yaffs2/yaffs_guts.h yaffs2_android/yaffs2/yaffs_guts.h
+--- yaffs2_android.orig/yaffs2/yaffs_guts.h Sun Feb 15 16:23:50 2009
++++ yaffs2_android/yaffs2/yaffs_guts.h Tue Mar 5 15:45:21 2013
+@@ -823,6 +823,10 @@
+ int yaffs_SetAttributes(yaffs_Object * obj, struct iattr *attr);
+ int yaffs_GetAttributes(yaffs_Object * obj, struct iattr *attr);
+
++#if defined(__OpenBSD__)
++#define loff_t off_t
++#endif
++
+ /* File operations */
+ int yaffs_ReadDataFromFile(yaffs_Object * obj, __u8 * buffer, loff_t offset,
+ int nBytes);