diff options
author | Fabio Berton <fbberton@gmail.com> | 2025-07-29 13:16:52 +0100 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2025-08-04 07:55:07 -0700 |
commit | c82f7a0577ad1e194cc830b010cbacb4ad667f55 (patch) | |
tree | e2b3d430bb60445ef0a4b3d2e9f50aac873510c4 | |
parent | f6b4415273ae6466e2efc2513be50c71fcabc439 (diff) | |
download | poky-c82f7a0577ad1e194cc830b010cbacb4ad667f55.tar.gz |
linux-libc-headers: Fix invalid conversion in cn_proc.h
Backport 'connector: Fix invalid conversion in cn_proc.h' commit to fix
error:
/
|/usr/include/linux/cn_proc.h: In function 'proc_cn_event
| valid_event(proc_cn_event)':
|/usr/include/linux/cn_proc.h:72:17: error: invalid conversion from
| 'unsigned int' to 'proc_cn_event' [-fpermissive]
| 72 | ev_type &= PROC_EVENT_ALL;
| | ^
| | |
| | unsigned int
\
Change is already merged in kernel branch linux-6.6.y [1].
1 - https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.6.y&id=06e785aeb9ea8a43d0a3967c1ba6e69d758e82d4
(From OE-Core rev: f023779af6c0e5c838bdacbd6d9765d1c6740575)
Signed-off-by: Fabio Berton <fbberton@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-connector-Fix-invalid-conversion-in-cn_proc.h.patch b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-connector-Fix-invalid-conversion-in-cn_proc.h.patch new file mode 100644 index 0000000000..e245d97de0 --- /dev/null +++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers/0001-connector-Fix-invalid-conversion-in-cn_proc.h.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From 06e785aeb9ea8a43d0a3967c1ba6e69d758e82d4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Matt Jan <zoo868e@gmail.com> | ||
3 | Date: Tue, 14 May 2024 12:10:46 +0800 | ||
4 | Subject: [PATCH] connector: Fix invalid conversion in cn_proc.h | ||
5 | |||
6 | The implicit conversion from unsigned int to enum | ||
7 | proc_cn_event is invalid, so explicitly cast it | ||
8 | for compilation in a C++ compiler. | ||
9 | /usr/include/linux/cn_proc.h: In function 'proc_cn_event valid_event(proc_cn_event)': | ||
10 | /usr/include/linux/cn_proc.h:72:17: error: invalid conversion from 'unsigned int' to 'proc_cn_event' [-fpermissive] | ||
11 | 72 | ev_type &= PROC_EVENT_ALL; | ||
12 | | ^ | ||
13 | | | | ||
14 | | unsigned int | ||
15 | |||
16 | Signed-off-by: Matt Jan <zoo868e@gmail.com> | ||
17 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
18 | |||
19 | Upstream-Status: Backport [https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=9258d795978f398ecf2d222a8388cff81d37d34d] | ||
20 | --- | ||
21 | include/uapi/linux/cn_proc.h | 3 +-- | ||
22 | 1 file changed, 1 insertion(+), 2 deletions(-) | ||
23 | |||
24 | diff --git a/include/uapi/linux/cn_proc.h b/include/uapi/linux/cn_proc.h | ||
25 | index f2afb7cc4926..18e3745b86cd 100644 | ||
26 | --- a/include/uapi/linux/cn_proc.h | ||
27 | +++ b/include/uapi/linux/cn_proc.h | ||
28 | @@ -69,8 +69,7 @@ struct proc_input { | ||
29 | |||
30 | static inline enum proc_cn_event valid_event(enum proc_cn_event ev_type) | ||
31 | { | ||
32 | - ev_type &= PROC_EVENT_ALL; | ||
33 | - return ev_type; | ||
34 | + return (enum proc_cn_event)(ev_type & PROC_EVENT_ALL); | ||
35 | } | ||
36 | |||
37 | /* | ||
38 | -- | ||
39 | 2.50.1 | ||
40 | |||
diff --git a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_6.6.bb b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_6.6.bb index d68de6ec7e..11e7524fed 100644 --- a/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_6.6.bb +++ b/meta/recipes-kernel/linux-libc-headers/linux-libc-headers_6.6.bb | |||
@@ -8,6 +8,7 @@ SRC_URI:append:libc-musl = "\ | |||
8 | 8 | ||
9 | SRC_URI += "\ | 9 | SRC_URI += "\ |
10 | file://0001-kbuild-install_headers.sh-Strip-_UAPI-from-if-define.patch \ | 10 | file://0001-kbuild-install_headers.sh-Strip-_UAPI-from-if-define.patch \ |
11 | file://0001-connector-Fix-invalid-conversion-in-cn_proc.h.patch \ | ||
11 | " | 12 | " |
12 | 13 | ||
13 | LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" | 14 | LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" |