summaryrefslogtreecommitdiffstats
path: root/recipes-containers/lxcfs
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2023-05-03 08:38:56 +0200
committerBruce Ashfield <bruce.ashfield@gmail.com>2023-05-08 18:41:38 -0400
commitd1b6bf580edb2ee2dce806a80994601366e3c0cd (patch)
treec102459bf51da99111a39b67c47538e0269a5736 /recipes-containers/lxcfs
parent3f692e3fe113b72852e0636fe58872830612c641 (diff)
downloadmeta-virtualization-d1b6bf580edb2ee2dce806a80994601366e3c0cd.tar.gz
lxcfs: fix build with newer linux-libc-headers
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-containers/lxcfs')
-rw-r--r--recipes-containers/lxcfs/lxcfs/0001-bindings-fix-build-with-newer-linux-libc-headers.patch50
-rw-r--r--recipes-containers/lxcfs/lxcfs_4.0.7.bb1
2 files changed, 51 insertions, 0 deletions
diff --git a/recipes-containers/lxcfs/lxcfs/0001-bindings-fix-build-with-newer-linux-libc-headers.patch b/recipes-containers/lxcfs/lxcfs/0001-bindings-fix-build-with-newer-linux-libc-headers.patch
new file mode 100644
index 00000000..64d19f47
--- /dev/null
+++ b/recipes-containers/lxcfs/lxcfs/0001-bindings-fix-build-with-newer-linux-libc-headers.patch
@@ -0,0 +1,50 @@
1From ca3c3484b078304998b3f2a2d6cd6c00540deb2c Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Fri, 28 Apr 2023 19:16:11 +0000
4Subject: [PATCH] bindings: fix build with newer linux-libc-headers
5
6Fixes:
7
8../../lxcfs-4.0.7/src/bindings.c: In function 'initpid_still_valid_pidfd':
9../../lxcfs-4.0.7/src/bindings.c:160:15: error: implicit declaration of function 'pidfd_send_signal'; did you mean 'SYS_pidfd_send_signal'? [-Werr
10or=implicit-function-declaration]
11 160 | ret = pidfd_send_signal(entry->init_pidfd, 0, NULL, 0);
12 | ^~~~~~~~~~~~~~~~~
13 | SYS_pidfd_send_signal
14../../lxcfs-4.0.7/src/bindings.c:160:15: warning: nested extern declaration of 'pidfd_send_signal' [-Wnested-externs]
15../../lxcfs-4.0.7/src/bindings.c: In function 'save_initpid':
16../../lxcfs-4.0.7/src/bindings.c:296:25: error: implicit declaration of function 'pidfd_open' [-Werror=implicit-function-declaration]
17 296 | pidfd = pidfd_open(pid, 0);
18 | ^~~~~~~~~~
19../../lxcfs-4.0.7/src/bindings.c:296:25: warning: nested extern declaration of 'pidfd_open' [-Wnested-externs]
20../../lxcfs-4.0.7/src/bindings.c: At top level:
21../../lxcfs-4.0.7/src/bindings.c:612:12: warning: function declaration isn't a prototype [-Wstrict-prototypes]
22 612 | static int pivot_enter()
23 | ^~~~~~~~~~~
24../../lxcfs-4.0.7/src/bindings.c: In function 'pivot_enter':
25../../lxcfs-4.0.7/src/bindings.c:612:12: warning: old-style function definition [-Wold-style-definition]
26../../lxcfs-4.0.7/src/bindings.c: At top level:
27../../lxcfs-4.0.7/src/bindings.c:655:12: warning: function declaration isn't a prototype [-Wstrict-prototypes]
28 655 | static int chroot_enter()
29 | ^~~~~~~~~~~~
30../../lxcfs-4.0.7/src/bindings.c: In function 'chroot_enter':
31../../lxcfs-4.0.7/src/bindings.c:655:12: warning: old-style function definition [-Wold-style-definition]
32
33Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
34Upstream-Status: Pending
35---
36 src/bindings.c | 1 +
37 1 file changed, 1 insertion(+)
38
39diff --git a/src/bindings.c b/src/bindings.c
40index 6f2444c..3e0d60a 100644
41--- a/src/bindings.c
42+++ b/src/bindings.c
43@@ -39,6 +39,7 @@
44 #include <sys/mman.h>
45 #include <sys/mount.h>
46 #include <sys/param.h>
47+#include <sys/pidfd.h>
48 #include <sys/socket.h>
49 #include <sys/syscall.h>
50 #include <sys/sysinfo.h>
diff --git a/recipes-containers/lxcfs/lxcfs_4.0.7.bb b/recipes-containers/lxcfs/lxcfs_4.0.7.bb
index be2c363a..364f9200 100644
--- a/recipes-containers/lxcfs/lxcfs_4.0.7.bb
+++ b/recipes-containers/lxcfs/lxcfs_4.0.7.bb
@@ -7,6 +7,7 @@ SRC_URI = " \
7 https://linuxcontainers.org/downloads/lxcfs/lxcfs-${PV}.tar.gz \ 7 https://linuxcontainers.org/downloads/lxcfs/lxcfs-${PV}.tar.gz \
8 file://systemd-allow-for-distinct-build-directory.patch \ 8 file://systemd-allow-for-distinct-build-directory.patch \
9 file://systemd-ensure-var-lib-lxcfs-exists.patch \ 9 file://systemd-ensure-var-lib-lxcfs-exists.patch \
10 file://0001-bindings-fix-build-with-newer-linux-libc-headers.patch \
10" 11"
11 12
12LIC_FILES_CHKSUM = "file://COPYING;md5=29ae50a788f33f663405488bc61eecb1" 13LIC_FILES_CHKSUM = "file://COPYING;md5=29ae50a788f33f663405488bc61eecb1"