summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/kmod
diff options
context:
space:
mode:
authorMatthew McClintock <msm@freescale.com>2012-08-24 13:16:37 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-08-25 14:46:59 +0100
commit1736b1d4cd17626e41b87a110d6e47009d879886 (patch)
treedb5726e532cdfc5235d24486d2c98e450e09aeeb /meta/recipes-kernel/kmod
parent4d8ea0216fd08473e16480677e7ec5cf9af31138 (diff)
downloadpoky-1736b1d4cd17626e41b87a110d6e47009d879886.tar.gz
kmod-native_git.bb: fix builds for hosts with older libc
kmod will fail to build with the following error because O_CLOEXEC is not defined: | libkmod/libkmod-module.c: In function 'kmod_module_get_initstate': | libkmod/libkmod-module.c:1640: error: 'O_CLOEXEC' undeclared (first use in this function) | libkmod/libkmod-module.c:1640: error: (Each undeclared identifier is reported only once | libkmod/libkmod-module.c:1640: error: for each function it appears in.) | libkmod/libkmod-module.c: In function 'kmod_module_get_refcnt': | libkmod/libkmod-module.c:1754: error: 'O_CLOEXEC' undeclared (first use in this function) | libkmod/libkmod-module.c: In function 'kmod_module_get_sections': | libkmod/libkmod-module.c:1913: error: 'O_CLOEXEC' undeclared (first use in this function) | libkmod/libkmod-file.c: In function 'kmod_file_open': | libkmod/libkmod-file.c:282: error: 'O_CLOEXEC' undeclared (first use in this function) | libkmod/libkmod-file.c:282: error: (Each undeclared identifier is reported only once | libkmod/libkmod-file.c:282: error: for each function it appears in.) Since we are only using kmod-native for depmod, and it's a non-threaded user of this libary being built this should be safe to override O_CLOEXEC. Keep in mind this is ONLY effecting the native builds and not what is being shipped in the root file system. (From OE-Core rev: edcb57fe308979cc5b92359d064e32bb70d4ad76) Signed-off-by: Matthew McClintock <msm@freescale.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/kmod')
-rw-r--r--meta/recipes-kernel/kmod/kmod-native_git.bb3
-rw-r--r--meta/recipes-kernel/kmod/kmod/fix-undefined-O_CLOEXEC.patch17
2 files changed, 19 insertions, 1 deletions
diff --git a/meta/recipes-kernel/kmod/kmod-native_git.bb b/meta/recipes-kernel/kmod/kmod-native_git.bb
index 96de8b8ef4..8cbcdf8ad7 100644
--- a/meta/recipes-kernel/kmod/kmod-native_git.bb
+++ b/meta/recipes-kernel/kmod/kmod-native_git.bb
@@ -4,7 +4,8 @@
4require kmod.inc 4require kmod.inc
5inherit native 5inherit native
6 6
7PR = "${INC_PR}.0" 7PR = "${INC_PR}.1"
8SRC_URI += "file://fix-undefined-O_CLOEXEC.patch"
8 9
9do_install_append (){ 10do_install_append (){
10 for tool in depmod insmod lsmod modinfo modprobe rmmod 11 for tool in depmod insmod lsmod modinfo modprobe rmmod
diff --git a/meta/recipes-kernel/kmod/kmod/fix-undefined-O_CLOEXEC.patch b/meta/recipes-kernel/kmod/kmod/fix-undefined-O_CLOEXEC.patch
new file mode 100644
index 0000000000..3177e9a1a9
--- /dev/null
+++ b/meta/recipes-kernel/kmod/kmod/fix-undefined-O_CLOEXEC.patch
@@ -0,0 +1,17 @@
1Upstream-Status: Not applicable
2
3Index: git/libkmod/libkmod-private.h
4===================================================================
5--- git.orig/libkmod/libkmod-private.h
6+++ git/libkmod/libkmod-private.h
7@@ -1,6 +1,10 @@
8 #ifndef _LIBKMOD_PRIVATE_H_
9 #define _LIBKMOD_PRIVATE_H_
10
11+#ifndef O_CLOEXEC
12+# define O_CLOEXEC 0
13+#endif
14+
15 #include <stdbool.h>
16 #include <stdio.h>
17 #include <syslog.h>