diff options
2 files changed, 63 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/0001-utils-fix-build-against-5.15-libc-headers-headers.patch b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/0001-utils-fix-build-against-5.15-libc-headers-headers.patch new file mode 100644 index 0000000000..6c11f1d4ca --- /dev/null +++ b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers/0001-utils-fix-build-against-5.15-libc-headers-headers.patch | |||
@@ -0,0 +1,62 @@ | |||
1 | From 7213a5bfa3bd9f360d6be01e6dbd59d91095a0fd Mon Sep 17 00:00:00 2001 | ||
2 | From: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
3 | Date: Thu, 4 Nov 2021 14:53:46 -0400 | ||
4 | Subject: [PATCH] utils: fix build against 5.15 libc-headers headers | ||
5 | |||
6 | In kernel v5.15+ stdarg.h is part of the kernel source, and the | ||
7 | upstream project has a change to prefer that stdarg.h to the | ||
8 | c-library variant and hence includes it as <linux/stdarg.h>, which | ||
9 | leads to the following build error: | ||
10 | |||
11 | | In file included from ../vboxsf/include/iprt/types.h:34, | ||
12 | | from ../vboxsf/include/iprt/string.h:33, | ||
13 | | from mount.vboxsf.c:53: | ||
14 | | ../vboxsf/include/iprt/stdarg.h:49:13: fatal error: linux/stdarg.h: No such file or directory | ||
15 | | 49 | # include <linux/stdarg.h> | ||
16 | | | ^~~~~~~~~~~~~~~~ | ||
17 | |||
18 | If we modify our build of the vboxdrivers to have the kernel source | ||
19 | directory on the include path (to find linux/stdarg.h, that leads | ||
20 | to the following errors: | ||
21 | |||
22 | In file included from build/tmp/work/qemux86_64-poky-linux/vboxguestdrivers/6.1.28-r0/recipe-sysroot/usr/include/stdlib.h:394, | ||
23 | | from mount.vboxsf.c:36: | ||
24 | | build/tmp/work/qemux86_64-poky-linux/vboxguestdrivers/6.1.28-r0/recipe-sysroot/usr/include/sys/types.h:192:20: note: previous declaration of 'blkcnt_t' with type 'blkcnt_t' {aka 'long int'} | ||
25 | | 192 | typedef __blkcnt_t blkcnt_t; /* Type to count number of disk blocks. */ | ||
26 | | | ^~~~~~~~ | ||
27 | | In file included from build/tmp/work-shared/qemux86-64/kernel-source/include/linux/time.h:5, | ||
28 | | from poky/build/tmp/work-shared/qemux86-64/kernel-source/include/linux/stat.h:19, | ||
29 | | from build/tmp/work/qemux86_64-poky-linux/vboxguestdrivers/6.1.28-r0/recipe-sysroot/usr/include/bits/statx.h:31, | ||
30 | |||
31 | Our libc-headers are safe and don't lead to the potential conflicing | ||
32 | information that the upstream commit is guarding against. The easiest | ||
33 | solution is to revert the upstream change and trust our headers. | ||
34 | |||
35 | Upstream-Status: Inappropriate [OE specific] | ||
36 | |||
37 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
38 | --- | ||
39 | vboxsf/include/iprt/stdarg.h | 7 +------ | ||
40 | 1 file changed, 1 insertion(+), 6 deletions(-) | ||
41 | |||
42 | diff --git a/include/iprt/stdarg.h b/include/iprt/stdarg.h | ||
43 | index c73093c..7bffde5 100644 | ||
44 | --- a/include/iprt/stdarg.h | ||
45 | +++ b/include/iprt/stdarg.h | ||
46 | @@ -44,12 +44,7 @@ | ||
47 | # define __builtin_stdarg_start __builtin_va_start | ||
48 | # endif | ||
49 | # elif defined(RT_OS_LINUX) && defined(IN_RING0) | ||
50 | -# include "linux/version.h" | ||
51 | -# if RTLNX_VER_MIN(5,15,0) | ||
52 | -# include <linux/stdarg.h> | ||
53 | -# else | ||
54 | -# include <stdarg.h> | ||
55 | -# endif | ||
56 | +# include <stdarg.h> | ||
57 | # else | ||
58 | # include <stdarg.h> | ||
59 | # endif | ||
60 | -- | ||
61 | 2.19.1 | ||
62 | |||
diff --git a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_6.1.28.bb b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_6.1.28.bb index 0265e38f5f..014fe30bbc 100644 --- a/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_6.1.28.bb +++ b/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_6.1.28.bb | |||
@@ -13,6 +13,7 @@ VBOX_NAME = "VirtualBox-${PV}" | |||
13 | 13 | ||
14 | SRC_URI = "http://download.virtualbox.org/virtualbox/${PV}/${VBOX_NAME}.tar.bz2 \ | 14 | SRC_URI = "http://download.virtualbox.org/virtualbox/${PV}/${VBOX_NAME}.tar.bz2 \ |
15 | file://Makefile.utils \ | 15 | file://Makefile.utils \ |
16 | file://0001-utils-fix-build-against-5.15-libc-headers-headers.patch \ | ||
16 | " | 17 | " |
17 | 18 | ||
18 | SRC_URI[md5sum] = "c6efae8dc115b90c6124e13126794c4f" | 19 | SRC_URI[md5sum] = "c6efae8dc115b90c6124e13126794c4f" |