summaryrefslogtreecommitdiffstats
path: root/recipes-containers/lxc
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-containers/lxc')
-rw-r--r--recipes-containers/lxc/files/0001-build-Check-if-P_PIDFD-is-defined.patch56
-rw-r--r--recipes-containers/lxc/lxc_git.bb3
2 files changed, 58 insertions, 1 deletions
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 @@
1From 4d00d4f8046972907ef34ac5677d07ae39f3aded Mon Sep 17 00:00:00 2001
2From: Jaeyoon Jung <jaeyoon.jung@lge.com>
3Date: Sun, 30 Nov 2025 11:51:13 +0900
4Subject: [PATCH] build: Check if P_PIDFD is defined
5
6It is defined in enum 'idtype_t' in some environment in which causes an
7error like:
8../git/src/lxc/process_utils.h:144:17: error: expected identifier before numeric constant
9 144 | #define P_PIDFD 3
10 | ^
11
12Signed-off-by: Jaeyoon Jung <jaeyoon.jung@lge.com>
13Upstream-Status: Submitted [https://github.com/lxc/lxc/pull/4614]
14---
15 meson.build | 11 +++++++++++
16 src/lxc/process_utils.h | 2 +-
17 2 files changed, 12 insertions(+), 1 deletion(-)
18
19diff --git a/meson.build b/meson.build
20index ec7524c2..4b3a8f07 100644
21--- a/meson.build
22+++ b/meson.build
23@@ -521,6 +521,17 @@ foreach ccattr: [
24 srcconf.set10('HAVE_COMPILER_ATTR_' + ccattr.underscorify().to_upper(), cc.has_function_attribute(ccattr))
25 endforeach
26
27+## P_PIDFD
28+test_code = '''
29+#include <sys/wait.h>
30+void func() { siginfo_t s; int r = waitid(P_PIDFD, 0, &s, 0); }
31+'''
32+if cc.compiles(test_code, name: 'waitid(P_PIDFD, ...)')
33+ srcconf.set('HAVE_P_PIDFD', 1)
34+ else
35+ srcconf.set('HAVE_P_PIDFD', 0)
36+endif
37+
38 ## Headers.
39 foreach ident: [
40 ['bpf', '''#include <sys/syscall.h>
41diff --git a/src/lxc/process_utils.h b/src/lxc/process_utils.h
42index effff9bd..f4f53a23 100644
43--- a/src/lxc/process_utils.h
44+++ b/src/lxc/process_utils.h
45@@ -139,7 +139,7 @@
46 #endif
47
48 /* waitid */
49-#if !HAVE_SYS_PIDFD_H
50+#if !HAVE_P_PIDFD
51 #ifndef P_PIDFD
52 #define P_PIDFD 3
53 #endif
54--
552.47.2
56
diff --git a/recipes-containers/lxc/lxc_git.bb b/recipes-containers/lxc/lxc_git.bb
index 2f0e8e74..d6f137d3 100644
--- a/recipes-containers/lxc/lxc_git.bb
+++ b/recipes-containers/lxc/lxc_git.bb
@@ -45,11 +45,12 @@ SRC_URI = "git://github.com/lxc/lxc.git;branch=stable-6.0;protocol=https \
45 file://0001-download-don-t-try-compatbility-index.patch \ 45 file://0001-download-don-t-try-compatbility-index.patch \
46 file://tests-our-init-is-not-busybox.patch \ 46 file://tests-our-init-is-not-busybox.patch \
47 file://0001-template-if-busybox-contains-init-use-it-in-containe.patch \ 47 file://0001-template-if-busybox-contains-init-use-it-in-containe.patch \
48 file://0001-build-Check-if-P_PIDFD-is-defined.patch \
48 file://dnsmasq.conf \ 49 file://dnsmasq.conf \
49 file://lxc-net \ 50 file://lxc-net \
50 " 51 "
51 52
52SRCREV = "9e4e69ed1cb93159b0da99dad8d320b795887d07" 53SRCREV = "f9ff9ea2a92653a823edf25e8e28c9dab08b3090"
53PV = "v6.0.5" 54PV = "v6.0.5"
54 55
55# Let's not configure for the host distro. 56# Let's not configure for the host distro.