From: Bruce Ashfield <bruce.ashfield@gmail.com>
To: jaeyoon.jung@lge.com
Cc: meta-virtualization@lists.yoctoproject.org
Subject: Re: [meta-virtualization] [PATCH v2] lxc: Fix build with musl
Date: Mon, 1 Dec 2025 23:52:20 -0500 [thread overview]
Message-ID: <aS5whNHrxKazRxVa@gmail.com> (raw)
In-Reply-To: <20251130032438.1200801-1-jaeyoon.jung@lge.com>
staged to master-next.
Bruce
In message: [meta-virtualization] [PATCH v2] lxc: Fix build with musl
on 30/11/2025 Jaeyoon Jung (LGE) via lists.yoctoproject.org wrote:
> From: Jaeyoon Jung <jaeyoon.jung@lge.com>
>
> Signed-off-by: Jaeyoon Jung <jaeyoon.jung@lge.com>
> ---
> ...01-build-Check-if-P_PIDFD-is-defined.patch | 56 +++++++++++++++++++
> recipes-containers/lxc/lxc_git.bb | 1 +
> 2 files changed, 57 insertions(+)
> create mode 100644 recipes-containers/lxc/files/0001-build-Check-if-P_PIDFD-is-defined.patch
>
> diff --git a/recipes-containers/lxc/files/0001-build-Check-if-P_PIDFD-is-defined.patch b/recipes-containers/lxc/files/0001-build-Check-if-P_PIDFD-is-defined.patch
> new file mode 100644
> index 00000000..b7a2bb05
> --- /dev/null
> +++ b/recipes-containers/lxc/files/0001-build-Check-if-P_PIDFD-is-defined.patch
> @@ -0,0 +1,56 @@
> +From 4d00d4f8046972907ef34ac5677d07ae39f3aded Mon Sep 17 00:00:00 2001
> +From: Jaeyoon Jung <jaeyoon.jung@lge.com>
> +Date: Sun, 30 Nov 2025 11:51:13 +0900
> +Subject: [PATCH] build: Check if P_PIDFD is defined
> +
> +It is defined in enum 'idtype_t' in some environment in which causes an
> +error like:
> +../git/src/lxc/process_utils.h:144:17: error: expected identifier before numeric constant
> + 144 | #define P_PIDFD 3
> + | ^
> +
> +Signed-off-by: Jaeyoon Jung <jaeyoon.jung@lge.com>
> +Upstream-Status: Submitted [https://github.com/lxc/lxc/pull/4614]
> +---
> + meson.build | 11 +++++++++++
> + src/lxc/process_utils.h | 2 +-
> + 2 files changed, 12 insertions(+), 1 deletion(-)
> +
> +diff --git a/meson.build b/meson.build
> +index ec7524c2..4b3a8f07 100644
> +--- a/meson.build
> ++++ b/meson.build
> +@@ -521,6 +521,17 @@ foreach ccattr: [
> + srcconf.set10('HAVE_COMPILER_ATTR_' + ccattr.underscorify().to_upper(), cc.has_function_attribute(ccattr))
> + endforeach
> +
> ++## P_PIDFD
> ++test_code = '''
> ++#include <sys/wait.h>
> ++void func() { siginfo_t s; int r = waitid(P_PIDFD, 0, &s, 0); }
> ++'''
> ++if cc.compiles(test_code, name: 'waitid(P_PIDFD, ...)')
> ++ srcconf.set('HAVE_P_PIDFD', 1)
> ++ else
> ++ srcconf.set('HAVE_P_PIDFD', 0)
> ++endif
> ++
> + ## Headers.
> + foreach ident: [
> + ['bpf', '''#include <sys/syscall.h>
> +diff --git a/src/lxc/process_utils.h b/src/lxc/process_utils.h
> +index effff9bd..f4f53a23 100644
> +--- a/src/lxc/process_utils.h
> ++++ b/src/lxc/process_utils.h
> +@@ -139,7 +139,7 @@
> + #endif
> +
> + /* waitid */
> +-#if !HAVE_SYS_PIDFD_H
> ++#if !HAVE_P_PIDFD
> + #ifndef P_PIDFD
> + #define P_PIDFD 3
> + #endif
> +--
> +2.47.2
> +
> diff --git a/recipes-containers/lxc/lxc_git.bb b/recipes-containers/lxc/lxc_git.bb
> index 2f0e8e74..5d4494a6 100644
> --- a/recipes-containers/lxc/lxc_git.bb
> +++ b/recipes-containers/lxc/lxc_git.bb
> @@ -45,6 +45,7 @@ SRC_URI = "git://github.com/lxc/lxc.git;branch=stable-6.0;protocol=https \
> file://0001-download-don-t-try-compatbility-index.patch \
> file://tests-our-init-is-not-busybox.patch \
> file://0001-template-if-busybox-contains-init-use-it-in-containe.patch \
> + file://0001-build-Check-if-P_PIDFD-is-defined.patch \
> file://dnsmasq.conf \
> file://lxc-net \
> "
> --
> 2.47.2
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#9464): https://lists.yoctoproject.org/g/meta-virtualization/message/9464
> Mute This Topic: https://lists.yoctoproject.org/mt/116535047/1050810
> Group Owner: meta-virtualization+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [bruce.ashfield@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
prev parent reply other threads:[~2025-12-02 4:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-30 3:24 [PATCH v2] lxc: Fix build with musl jaeyoon.jung
2025-12-02 4:52 ` Bruce Ashfield [this message]
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=aS5whNHrxKazRxVa@gmail.com \
--to=bruce.ashfield@gmail.com \
--cc=jaeyoon.jung@lge.com \
--cc=meta-virtualization@lists.yoctoproject.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