diff options
| -rw-r--r-- | meta-oe/recipes-support/mcelog/mcelog/0001-server-Correct-prameter-type-for-connect-API.patch | 43 | ||||
| -rw-r--r-- | meta-oe/recipes-support/mcelog/mcelog_198.bb | 1 |
2 files changed, 44 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/mcelog/mcelog/0001-server-Correct-prameter-type-for-connect-API.patch b/meta-oe/recipes-support/mcelog/mcelog/0001-server-Correct-prameter-type-for-connect-API.patch new file mode 100644 index 0000000000..2f26f9ced5 --- /dev/null +++ b/meta-oe/recipes-support/mcelog/mcelog/0001-server-Correct-prameter-type-for-connect-API.patch | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | From 0370e7a9fb0ca1b27d7b0897739e2a7cce8977ab Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sat, 11 May 2024 22:42:07 -0700 | ||
| 4 | Subject: [PATCH] server: Correct prameter type for connect() API | ||
| 5 | |||
| 6 | connect() function expects the second argument to be point to sockaddr | ||
| 7 | as per man sockaddr | ||
| 8 | |||
| 9 | int connect (int, const struct sockaddr *, socklen_t); | ||
| 10 | |||
| 11 | Fixes build failures with -Wincompatible-pointer-types when using GCC-14 | ||
| 12 | and musl | ||
| 13 | |||
| 14 | Fixes | ||
| 15 | | server.c: In function 'server_ping': | ||
| 16 | | server.c:308:33: error: passing argument 2 of 'connect' from incompatible pointer type [-Wincompatible-pointer-types] | ||
| 17 | | 308 | if (connect(fd, un, sizeof(struct sockaddr_un)) < 0) | ||
| 18 | | | ^~ | ||
| 19 | | | | | ||
| 20 | | | struct sockaddr_un * | ||
| 21 | |||
| 22 | Upstream-Status: Submitted [ sent to contact@mcelog.org ] | ||
| 23 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 24 | --- | ||
| 25 | server.c | 2 +- | ||
| 26 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 27 | |||
| 28 | diff --git a/server.c b/server.c | ||
| 29 | index 54c7d57..51b7d3a 100644 | ||
| 30 | --- a/server.c | ||
| 31 | +++ b/server.c | ||
| 32 | @@ -305,7 +305,7 @@ static int server_ping(struct sockaddr_un *un) | ||
| 33 | if (sigsetjmp(ping_timeout_ctx, 1) == 0) { | ||
| 34 | ret = -1; | ||
| 35 | alarm(initial_ping_timeout); | ||
| 36 | - if (connect(fd, un, sizeof(struct sockaddr_un)) < 0) | ||
| 37 | + if (connect(fd, (const struct sockaddr *)un, sizeof(struct sockaddr_un)) < 0) | ||
| 38 | goto cleanup; | ||
| 39 | if (write(fd, PAIR("ping\n")) < 0) | ||
| 40 | goto cleanup; | ||
| 41 | -- | ||
| 42 | 2.45.0 | ||
| 43 | |||
diff --git a/meta-oe/recipes-support/mcelog/mcelog_198.bb b/meta-oe/recipes-support/mcelog/mcelog_198.bb index e302f4175d..10b2293195 100644 --- a/meta-oe/recipes-support/mcelog/mcelog_198.bb +++ b/meta-oe/recipes-support/mcelog/mcelog_198.bb | |||
| @@ -8,6 +8,7 @@ SECTION = "System Environment/Base" | |||
| 8 | SRC_URI = "\ | 8 | SRC_URI = "\ |
| 9 | git://git.kernel.org/pub/scm/utils/cpu/mce/mcelog.git;protocol=http;;branch=master \ | 9 | git://git.kernel.org/pub/scm/utils/cpu/mce/mcelog.git;protocol=http;;branch=master \ |
| 10 | file://0001-client-Include-string.h-form-mem-function-prototypes.patch \ | 10 | file://0001-client-Include-string.h-form-mem-function-prototypes.patch \ |
| 11 | file://0001-server-Correct-prameter-type-for-connect-API.patch \ | ||
| 11 | file://run-ptest \ | 12 | file://run-ptest \ |
| 12 | " | 13 | " |
| 13 | 14 | ||
