diff options
Diffstat (limited to 'recipes-containers/lxc/files')
| -rw-r--r-- | recipes-containers/lxc/files/0001-build-Check-if-P_PIDFD-is-defined.patch | 56 |
1 files changed, 56 insertions, 0 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 @@ | |||
| 1 | From 4d00d4f8046972907ef34ac5677d07ae39f3aded Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Jaeyoon Jung <jaeyoon.jung@lge.com> | ||
| 3 | Date: Sun, 30 Nov 2025 11:51:13 +0900 | ||
| 4 | Subject: [PATCH] build: Check if P_PIDFD is defined | ||
| 5 | |||
| 6 | It is defined in enum 'idtype_t' in some environment in which causes an | ||
| 7 | error like: | ||
| 8 | ../git/src/lxc/process_utils.h:144:17: error: expected identifier before numeric constant | ||
| 9 | 144 | #define P_PIDFD 3 | ||
| 10 | | ^ | ||
| 11 | |||
| 12 | Signed-off-by: Jaeyoon Jung <jaeyoon.jung@lge.com> | ||
| 13 | Upstream-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 | |||
| 19 | diff --git a/meson.build b/meson.build | ||
| 20 | index 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> | ||
| 41 | diff --git a/src/lxc/process_utils.h b/src/lxc/process_utils.h | ||
| 42 | index 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 | -- | ||
| 55 | 2.47.2 | ||
| 56 | |||
