Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Saul Wold <sgw@linux.intel.com>
To: Matthew McClintock <msm@freescale.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH v2] kmod-native_git.bb: fix builds for hosts with older libc
Date: Mon, 27 Aug 2012 08:48:23 -0700	[thread overview]
Message-ID: <503B96C7.8070304@linux.intel.com> (raw)
In-Reply-To: <1345832197-3648-1-git-send-email-msm@freescale.com>

On 08/24/2012 11:16 AM, Matthew McClintock wrote:
> 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.
>
> Signed-off-by: Matthew McClintock <msm@freescale.com>
> ---
> v2: use patch instead of munging CFLAGS
>
>   meta/recipes-kernel/kmod/kmod-native_git.bb        |    3 ++-
>   .../kmod/kmod/fix-undefined-O_CLOEXEC.patch        |   17 +++++++++++++++++
>   2 files changed, 19 insertions(+), 1 deletion(-)
>   create mode 100644 meta/recipes-kernel/kmod/kmod/fix-undefined-O_CLOEXEC.patch
>
> diff --git a/meta/recipes-kernel/kmod/kmod-native_git.bb b/meta/recipes-kernel/kmod/kmod-native_git.bb
> index 96de8b8..8cbcdf8 100644
> --- a/meta/recipes-kernel/kmod/kmod-native_git.bb
> +++ b/meta/recipes-kernel/kmod/kmod-native_git.bb
> @@ -4,7 +4,8 @@
>   require kmod.inc
>   inherit native
>
> -PR = "${INC_PR}.0"
> +PR = "${INC_PR}.1"
> +SRC_URI += "file://fix-undefined-O_CLOEXEC.patch"
>
>   do_install_append (){
>   	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 0000000..3177e9a
> --- /dev/null
> +++ b/meta/recipes-kernel/kmod/kmod/fix-undefined-O_CLOEXEC.patch
> @@ -0,0 +1,17 @@
> +Upstream-Status: Not applicable
> +
> +Index: git/libkmod/libkmod-private.h
> +===================================================================
> +--- git.orig/libkmod/libkmod-private.h
> ++++ git/libkmod/libkmod-private.h
> +@@ -1,6 +1,10 @@
> + #ifndef _LIBKMOD_PRIVATE_H_
> + #define _LIBKMOD_PRIVATE_H_
> +
> ++#ifndef O_CLOEXEC
> ++# define O_CLOEXEC 0
> ++#endif
> ++
> + #include <stdbool.h>
> + #include <stdio.h>
> + #include <syslog.h>
>

Merged into OE-Core

Thanks
	Sau!




  reply	other threads:[~2012-08-27 16:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-24 18:16 [PATCH v2] kmod-native_git.bb: fix builds for hosts with older libc Matthew McClintock
2012-08-27 15:48 ` Saul Wold [this message]
  -- strict thread matches above, loose matches on Subject: below --
2012-08-21 16:20 Matthew McClintock
2012-08-21 17:54 ` Khem Raj
2012-08-21 17:59   ` McClintock Matthew-B29882
2012-08-21 18:06     ` Khem Raj
2012-08-21 18:10       ` McClintock Matthew-B29882
2012-08-21 18:30         ` Khem Raj
2012-08-21 18:41           ` Saul Wold
2012-08-21 18:46             ` McClintock Matthew-B29882
2012-08-21 18:48             ` Khem Raj
2012-08-21 19:02               ` Chris Larson
2012-08-21 19:11                 ` McClintock Matthew-B29882
2012-08-21 18:47           ` McClintock Matthew-B29882
2012-08-21 19:13             ` Chris Larson
2012-08-21 19:15               ` McClintock Matthew-B29882

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=503B96C7.8070304@linux.intel.com \
    --to=sgw@linux.intel.com \
    --cc=msm@freescale.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox