summaryrefslogtreecommitdiff
path: root/toolchain
diff options
context:
space:
mode:
authorDaniel Dickinson <crazycshore@gmail.com>2012-05-13 05:02:27 +0000
committerDaniel Dickinson <crazycshore@gmail.com>2012-05-13 05:02:27 +0000
commit9cc9e8b608c51e5901cc1e314f1f4962b6618ee2 (patch)
tree7aca8d330e2d7423e61c6bbb78dba9e2893aeb16 /toolchain
parent482b99a660010f81606ecf8cc4431d55893f7b1a (diff)
downloadmtk-20170518-9cc9e8b608c51e5901cc1e314f1f4962b6618ee2.zip
mtk-20170518-9cc9e8b608c51e5901cc1e314f1f4962b6618ee2.tar.gz
mtk-20170518-9cc9e8b608c51e5901cc1e314f1f4962b6618ee2.tar.bz2
kernel-headers: Fix patch application for kernel-headers and a patch that fixes exposure of a kernel-only data type (umode_t) to application layer which causes compile errors in ext2_fs.h using programs.
SVN-Revision: 31697
Diffstat (limited to 'toolchain')
-rw-r--r--toolchain/kernel-headers/Makefile2
-rw-r--r--toolchain/kernel-headers/patches-3.3.5/100-ext2_fs_header.patch24
2 files changed, 25 insertions, 1 deletions
diff --git a/toolchain/kernel-headers/Makefile b/toolchain/kernel-headers/Makefile
index b5aaa83..ca8a78f 100644
--- a/toolchain/kernel-headers/Makefile
+++ b/toolchain/kernel-headers/Makefile
@@ -22,7 +22,7 @@ HOST_BUILD_DIR:=$(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)
PKG_MD5SUM:=$(LINUX_KERNEL_MD5SUM)
LINUX_DIR := $(HOST_BUILD_DIR)
FILES_DIR :=
-PATCH_DIR := ./patches$(if $(wildcard ./patches-$(KERNEL_PATCHVER)),-$(KERNEL_PATCHVER))
+PATCH_DIR := ./patches$(if $(wildcard ./patches-$(LINUX_VERSION)),-$(LINUX_VERSION))
include $(INCLUDE_DIR)/toolchain-build.mk
include $(INCLUDE_DIR)/kernel-defaults.mk
diff --git a/toolchain/kernel-headers/patches-3.3.5/100-ext2_fs_header.patch b/toolchain/kernel-headers/patches-3.3.5/100-ext2_fs_header.patch
new file mode 100644
index 0000000..1bd9c9d
--- /dev/null
+++ b/toolchain/kernel-headers/patches-3.3.5/100-ext2_fs_header.patch
@@ -0,0 +1,24 @@
+Index: linux-3.3.5/include/linux/ext2_fs.h
+===================================================================
+--- linux-3.3.5.orig/include/linux/ext2_fs.h 2012-05-12 05:49:43.555033434 -0400
++++ linux-3.3.5/include/linux/ext2_fs.h 2012-05-12 05:51:01.895033564 -0400
+@@ -209,7 +209,11 @@
+ #define EXT2_OTHER_FLMASK (EXT2_NODUMP_FL | EXT2_NOATIME_FL)
+
+ /* Mask out flags that are inappropriate for the given type of inode. */
++#ifdef __KERNEL__
+ static inline __u32 ext2_mask_flags(umode_t mode, __u32 flags)
++#else
++static inline __u32 ext2_mask_flags(unsigned short mode, __u32 flags)
++#endif
+ {
+ if (S_ISDIR(mode))
+ return flags;
+@@ -219,6 +223,7 @@
+ return flags & EXT2_OTHER_FLMASK;
+ }
+
++
+ /*
+ * ioctl commands
+ */