* [PATCH] kmod: Handle undefined O_CLOEXEC
@ 2012-07-23 14:02 Radu Moisan
2012-07-23 15:52 ` Gary Thomas
0 siblings, 1 reply; 2+ messages in thread
From: Radu Moisan @ 2012-07-23 14:02 UTC (permalink / raw)
To: openembedded-core
Close-on-exec seems to be unsuported on some architectures like CentOS 5.8
and thus causing some packages to fail to build successfully. Future kernel
version will probably fix this, but for now this patch works around this
problem.
Signed-off-by: Radu Moisan <radu.moisan@intel.com>
---
meta/recipes-kernel/kmod/kmod.inc | 3 +-
.../Handle-unsupported-close-on-exec-flag.patch | 60 ++++++++++++++++++++
2 files changed, 62 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-kernel/kmod/kmod/Handle-unsupported-close-on-exec-flag.patch
diff --git a/meta/recipes-kernel/kmod/kmod.inc b/meta/recipes-kernel/kmod/kmod.inc
index adba4d4..c992ad8 100644
--- a/meta/recipes-kernel/kmod/kmod.inc
+++ b/meta/recipes-kernel/kmod/kmod.inc
@@ -8,7 +8,7 @@ LICENSE = "GPL-2.0+ & LGPL-2.1+"
LICENSE_libkmod = "LGPL-2.1+"
SECTION = "base"
PV = "8"
-INC_PR = "r1"
+INC_PR = "r2"
DEPENDS += "pkgconfig-native"
@@ -20,6 +20,7 @@ inherit autotools gtk-doc
SRC_URI = "git://git.profusion.mobi/kmod.git;protocol=git;branch=master \
file://depmod-search.conf \
file://0001-man-disable-man-page-generation-because-we-don-t-hav.patch \
+ file://Handle-unsupported-close-on-exec-flag.patch \
"
SRCREV = "819f79a24d58e3c8429f1631df2f8f85a2f95d4a"
diff --git a/meta/recipes-kernel/kmod/kmod/Handle-unsupported-close-on-exec-flag.patch b/meta/recipes-kernel/kmod/kmod/Handle-unsupported-close-on-exec-flag.patch
new file mode 100644
index 0000000..f0820d9
--- /dev/null
+++ b/meta/recipes-kernel/kmod/kmod/Handle-unsupported-close-on-exec-flag.patch
@@ -0,0 +1,60 @@
+Index: git/libkmod/libkmod-config.c
+===================================================================
+--- git.orig/libkmod/libkmod-config.c 2012-07-23 16:13:44.000000000 +0300
++++ git/libkmod/libkmod-config.c 2012-07-23 16:15:53.000000000 +0300
+@@ -33,6 +33,10 @@
+ #include "libkmod.h"
+ #include "libkmod-private.h"
+
++#ifndef O_CLOEXEC
++#define O_CLOEXEC 0
++#endif
++
+ struct kmod_alias {
+ char *name;
+ char modname[];
+Index: git/libkmod/libkmod-file.c
+===================================================================
+--- git.orig/libkmod/libkmod-file.c 2012-07-23 16:13:44.000000000 +0300
++++ git/libkmod/libkmod-file.c 2012-07-23 16:15:57.000000000 +0300
+@@ -31,6 +31,10 @@
+ #include "libkmod.h"
+ #include "libkmod-private.h"
+
++#ifndef O_CLOEXEC
++#define O_CLOEXEC 0
++#endif
++
+ #ifdef ENABLE_XZ
+ #include <lzma.h>
+ #endif
+Index: git/libkmod/libkmod-index.c
+===================================================================
+--- git.orig/libkmod/libkmod-index.c 2012-07-23 16:13:44.000000000 +0300
++++ git/libkmod/libkmod-index.c 2012-07-23 16:16:00.000000000 +0300
+@@ -31,6 +31,10 @@
+ #include "libkmod-index.h"
+ #include "macro.h"
+
++#ifndef O_CLOEXEC
++#define O_CLOEXEC 0
++#endif
++
+ /* index.c: module index file shared functions for modprobe and depmod */
+
+ #define INDEX_CHILDMAX 128
+Index: git/libkmod/libkmod-module.c
+===================================================================
+--- git.orig/libkmod/libkmod-module.c 2012-07-23 16:13:44.000000000 +0300
++++ git/libkmod/libkmod-module.c 2012-07-23 16:16:04.000000000 +0300
+@@ -40,6 +40,10 @@
+ #include "libkmod.h"
+ #include "libkmod-private.h"
+
++#ifndef O_CLOEXEC
++#define O_CLOEXEC 0
++#endif
++
+ /**
+ * SECTION:libkmod-module
+ * @short_description: operate on kernel modules
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] kmod: Handle undefined O_CLOEXEC
2012-07-23 14:02 [PATCH] kmod: Handle undefined O_CLOEXEC Radu Moisan
@ 2012-07-23 15:52 ` Gary Thomas
0 siblings, 0 replies; 2+ messages in thread
From: Gary Thomas @ 2012-07-23 15:52 UTC (permalink / raw)
To: openembedded-core
On 2012-07-23 08:02, Radu Moisan wrote:
> Close-on-exec seems to be unsuported on some architectures like CentOS 5.8
> and thus causing some packages to fail to build successfully. Future kernel
> version will probably fix this, but for now this patch works around this
> problem.
>
> Signed-off-by: Radu Moisan <radu.moisan@intel.com>
> ---
> meta/recipes-kernel/kmod/kmod.inc | 3 +-
> .../Handle-unsupported-close-on-exec-flag.patch | 60 ++++++++++++++++++++
> 2 files changed, 62 insertions(+), 1 deletion(-)
> create mode 100644 meta/recipes-kernel/kmod/kmod/Handle-unsupported-close-on-exec-flag.patch
>
> diff --git a/meta/recipes-kernel/kmod/kmod.inc b/meta/recipes-kernel/kmod/kmod.inc
> index adba4d4..c992ad8 100644
> --- a/meta/recipes-kernel/kmod/kmod.inc
> +++ b/meta/recipes-kernel/kmod/kmod.inc
> @@ -8,7 +8,7 @@ LICENSE = "GPL-2.0+ & LGPL-2.1+"
> LICENSE_libkmod = "LGPL-2.1+"
> SECTION = "base"
> PV = "8"
> -INC_PR = "r1"
> +INC_PR = "r2"
>
> DEPENDS += "pkgconfig-native"
>
> @@ -20,6 +20,7 @@ inherit autotools gtk-doc
> SRC_URI = "git://git.profusion.mobi/kmod.git;protocol=git;branch=master \
> file://depmod-search.conf \
> file://0001-man-disable-man-page-generation-because-we-don-t-hav.patch \
> + file://Handle-unsupported-close-on-exec-flag.patch \
> "
>
> SRCREV = "819f79a24d58e3c8429f1631df2f8f85a2f95d4a"
> diff --git a/meta/recipes-kernel/kmod/kmod/Handle-unsupported-close-on-exec-flag.patch b/meta/recipes-kernel/kmod/kmod/Handle-unsupported-close-on-exec-flag.patch
> new file mode 100644
> index 0000000..f0820d9
> --- /dev/null
> +++ b/meta/recipes-kernel/kmod/kmod/Handle-unsupported-close-on-exec-flag.patch
> @@ -0,0 +1,60 @@
> +Index: git/libkmod/libkmod-config.c
> +===================================================================
> +--- git.orig/libkmod/libkmod-config.c 2012-07-23 16:13:44.000000000 +0300
> ++++ git/libkmod/libkmod-config.c 2012-07-23 16:15:53.000000000 +0300
> +@@ -33,6 +33,10 @@
> + #include "libkmod.h"
> + #include "libkmod-private.h"
> +
> ++#ifndef O_CLOEXEC
> ++#define O_CLOEXEC 0
> ++#endif
> ++
> + struct kmod_alias {
> + char *name;
> + char modname[];
> +Index: git/libkmod/libkmod-file.c
> +===================================================================
> +--- git.orig/libkmod/libkmod-file.c 2012-07-23 16:13:44.000000000 +0300
> ++++ git/libkmod/libkmod-file.c 2012-07-23 16:15:57.000000000 +0300
> +@@ -31,6 +31,10 @@
> + #include "libkmod.h"
> + #include "libkmod-private.h"
> +
> ++#ifndef O_CLOEXEC
> ++#define O_CLOEXEC 0
> ++#endif
> ++
> + #ifdef ENABLE_XZ
> + #include <lzma.h>
> + #endif
> +Index: git/libkmod/libkmod-index.c
> +===================================================================
> +--- git.orig/libkmod/libkmod-index.c 2012-07-23 16:13:44.000000000 +0300
> ++++ git/libkmod/libkmod-index.c 2012-07-23 16:16:00.000000000 +0300
> +@@ -31,6 +31,10 @@
> + #include "libkmod-index.h"
> + #include "macro.h"
> +
> ++#ifndef O_CLOEXEC
> ++#define O_CLOEXEC 0
> ++#endif
> ++
> + /* index.c: module index file shared functions for modprobe and depmod */
> +
> + #define INDEX_CHILDMAX 128
> +Index: git/libkmod/libkmod-module.c
> +===================================================================
> +--- git.orig/libkmod/libkmod-module.c 2012-07-23 16:13:44.000000000 +0300
> ++++ git/libkmod/libkmod-module.c 2012-07-23 16:16:04.000000000 +0300
> +@@ -40,6 +40,10 @@
> + #include "libkmod.h"
> + #include "libkmod-private.h"
> +
> ++#ifndef O_CLOEXEC
> ++#define O_CLOEXEC 0
> ++#endif
> ++
> + /**
> + * SECTION:libkmod-module
> + * @short_description: operate on kernel modules
>
Why didn't you put this change in 'libkmod.h' - then you'd only have
to change a single file.
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-07-23 16:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-23 14:02 [PATCH] kmod: Handle undefined O_CLOEXEC Radu Moisan
2012-07-23 15:52 ` Gary Thomas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox