commit: 745e63896e35b76de6516146f8abd3220517c648 Author: Viorel Munteanu <ceamac <AT> gentoo <DOT> org> AuthorDate: Sun Dec 29 09:54:44 2024 +0000 Commit: Viorel Munteanu <ceamac <AT> gentoo <DOT> org> CommitDate: Sun Dec 29 09:54:44 2024 +0000 URL: https://gitweb.gentoo.org/proj/virtualbox-patches.git/commit/?id=745e6389
Fix C23 issue while compiling a kernel module When compiling the kernel module, stdbool.h is not available. Signed-off-by: Viorel Munteanu <ceamac <AT> gentoo.org> patches/029_virtualbox-7.1.4_C23.patch | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/patches/029_virtualbox-7.1.4_C23.patch b/patches/029_virtualbox-7.1.4_C23.patch index 2ff466e..4544fb0 100644 --- a/patches/029_virtualbox-7.1.4_C23.patch +++ b/patches/029_virtualbox-7.1.4_C23.patch @@ -2,13 +2,19 @@ https://bugs.gentoo.org/946955 --- a/include/iprt/types.h +++ b/include/iprt/types.h -@@ -281,8 +281,7 @@ +@@ -281,8 +281,14 @@ typedef _Bool bool; # endif # else -# undef bool /* see above netbsd explanation */ --typedef _Bool bool; -+# include <stdbool.h> ++# if defined(__KERNEL__) ++# if __STDC_VERSION__ < 202311L ++# undef bool /* see above netbsd explanation */ + typedef _Bool bool; ++# endif ++# else ++# include <stdbool.h> ++# endif # endif # else # if RT_MSC_PREREQ(RT_MSC_VER_VC120)
