summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2025-05-12 09:37:52 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2025-05-12 15:50:19 +0200
commitf5516c2fcd6217bf83736326e78b14cf64282e3a (patch)
tree2c45cb56fe9dd62070a1f698a1d15d296f8a9ea5
parentdc129ca65213d3dea3c8ab7ba5d6016605b44e7b (diff)
downloadmeta-freescale-f5516c2fcd6217bf83736326e78b14cf64282e3a.tar.gz
linux-imx-headers: make uapi ipu.h, pxp_dma.h compatible with c23 standard
In C23 bool, false and true are reserved keywords. Make ipu.h, pxp_dma.h uapi include file compatible with C23 standard. The ipu.h header is i.e. used in the imx-gst1.0-plugin code. If building with GCC 15 the build fails. FAILED: libs/libgstfsl-1.0.so.0.0.0.p/v4l2_core_gstimxv4l2.c.o ...imx-gst1.0-plugin/4.9.2+git/recipe-sysroot/usr/include/imx/linux/ipu.h:32:23: error: 'bool' cannot be defined via 'typedef' 32 | typedef unsigned char bool; That pxp_dma.h is affected was found with grep. A configuration which actually includes the file is yet to be found. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
-rw-r--r--recipes-kernel/linux/linux-imx-headers/0001-video-fbdev-mxc-make-uapi-ipu.h-pxp_dma.h-compatible.patch54
-rw-r--r--recipes-kernel/linux/linux-imx-headers_6.6.bb5
2 files changed, 58 insertions, 1 deletions
diff --git a/recipes-kernel/linux/linux-imx-headers/0001-video-fbdev-mxc-make-uapi-ipu.h-pxp_dma.h-compatible.patch b/recipes-kernel/linux/linux-imx-headers/0001-video-fbdev-mxc-make-uapi-ipu.h-pxp_dma.h-compatible.patch
new file mode 100644
index 00000000..1750d624
--- /dev/null
+++ b/recipes-kernel/linux/linux-imx-headers/0001-video-fbdev-mxc-make-uapi-ipu.h-pxp_dma.h-compatible.patch
@@ -0,0 +1,54 @@
1From a5bcb18b42cfc0485397da9f48be6a73de86dfac Mon Sep 17 00:00:00 2001
2From: Max Krummenacher <max.krummenacher@toradex.com>
3Date: Sat, 10 May 2025 14:21:35 +0200
4Subject: [PATCH] video: fbdev: mxc: make uapi ipu.h, pxp_dma.h compatible with
5 c23 standard
6
7In C23 standard bool, false, true are reserved keywords.
8Make ipu.h, pxp_dma.h uapi include file compatible with C23 standard.
9
10Upstream-Status: Pending
11Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
12---
13 include/uapi/linux/ipu.h | 4 ++++
14 include/uapi/linux/pxp_dma.h | 4 ++++
15 2 files changed, 8 insertions(+)
16
17diff --git a/include/uapi/linux/ipu.h b/include/uapi/linux/ipu.h
18index c92f292bcc9d..a7b60730bbd4 100644
19--- a/include/uapi/linux/ipu.h
20+++ b/include/uapi/linux/ipu.h
21@@ -29,9 +29,13 @@
22 #include <linux/videodev2.h>
23
24 #ifndef __KERNEL__
25+#if defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L
26+/* bool, true and false are keywords. */
27+#else
28 #ifndef __cplusplus
29 typedef unsigned char bool;
30 #endif
31+#endif
32 #define irqreturn_t int
33 #define dma_addr_t int
34 #define uint32_t unsigned int
35diff --git a/include/uapi/linux/pxp_dma.h b/include/uapi/linux/pxp_dma.h
36index 9b5228504095..e2deff07516d 100644
37--- a/include/uapi/linux/pxp_dma.h
38+++ b/include/uapi/linux/pxp_dma.h
39@@ -25,8 +25,12 @@
40
41 #ifndef __KERNEL__
42 typedef unsigned long dma_addr_t;
43+#if defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L
44+/* bool, true and false are keywords. */
45+#else
46 typedef unsigned char bool;
47 #endif
48+#endif
49
50 /* PXP Pixel format definitions */
51 /* Four-character-code (FOURCC) */
52--
532.42.0
54
diff --git a/recipes-kernel/linux/linux-imx-headers_6.6.bb b/recipes-kernel/linux/linux-imx-headers_6.6.bb
index dbf4442c..41c337c4 100644
--- a/recipes-kernel/linux/linux-imx-headers_6.6.bb
+++ b/recipes-kernel/linux/linux-imx-headers_6.6.bb
@@ -7,7 +7,10 @@ New headers are installed in ${includedir}/imx."
7LICENSE = "GPL-2.0-only" 7LICENSE = "GPL-2.0-only"
8LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" 8LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46"
9 9
10SRC_URI = "git://github.com/nxp-imx/linux-imx.git;protocol=https;branch=${SRCBRANCH}" 10SRC_URI = " \
11 git://github.com/nxp-imx/linux-imx.git;protocol=https;branch=${SRCBRANCH} \
12 file://0001-video-fbdev-mxc-make-uapi-ipu.h-pxp_dma.h-compatible.patch \
13"
11SRCBRANCH = "lf-6.6.y" 14SRCBRANCH = "lf-6.6.y"
12LOCALVERSION = "-6.6.52-2.2.0" 15LOCALVERSION = "-6.6.52-2.2.0"
13SRCREV = "e0f9e2afd4cff3f02d71891244b4aa5899dfc786" 16SRCREV = "e0f9e2afd4cff3f02d71891244b4aa5899dfc786"