diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2025-05-12 09:37:52 +0200 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2025-05-12 15:50:19 +0200 |
commit | f5516c2fcd6217bf83736326e78b14cf64282e3a (patch) | |
tree | 2c45cb56fe9dd62070a1f698a1d15d296f8a9ea5 | |
parent | dc129ca65213d3dea3c8ab7ba5d6016605b44e7b (diff) | |
download | meta-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.patch | 54 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-imx-headers_6.6.bb | 5 |
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 @@ | |||
1 | From a5bcb18b42cfc0485397da9f48be6a73de86dfac Mon Sep 17 00:00:00 2001 | ||
2 | From: Max Krummenacher <max.krummenacher@toradex.com> | ||
3 | Date: Sat, 10 May 2025 14:21:35 +0200 | ||
4 | Subject: [PATCH] video: fbdev: mxc: make uapi ipu.h, pxp_dma.h compatible with | ||
5 | c23 standard | ||
6 | |||
7 | In C23 standard bool, false, true are reserved keywords. | ||
8 | Make ipu.h, pxp_dma.h uapi include file compatible with C23 standard. | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | Signed-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 | |||
17 | diff --git a/include/uapi/linux/ipu.h b/include/uapi/linux/ipu.h | ||
18 | index 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 | ||
35 | diff --git a/include/uapi/linux/pxp_dma.h b/include/uapi/linux/pxp_dma.h | ||
36 | index 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 | -- | ||
53 | 2.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." | |||
7 | LICENSE = "GPL-2.0-only" | 7 | LICENSE = "GPL-2.0-only" |
8 | LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" | 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" |
9 | 9 | ||
10 | SRC_URI = "git://github.com/nxp-imx/linux-imx.git;protocol=https;branch=${SRCBRANCH}" | 10 | SRC_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 | " | ||
11 | SRCBRANCH = "lf-6.6.y" | 14 | SRCBRANCH = "lf-6.6.y" |
12 | LOCALVERSION = "-6.6.52-2.2.0" | 15 | LOCALVERSION = "-6.6.52-2.2.0" |
13 | SRCREV = "e0f9e2afd4cff3f02d71891244b4aa5899dfc786" | 16 | SRCREV = "e0f9e2afd4cff3f02d71891244b4aa5899dfc786" |