diff options
| -rw-r--r-- | meta-oe/recipes-test/pm-qa/pm-qa/0001-fix-build-with-gcc-15-Wincompatible-pointer-types-er.patch | 69 | ||||
| -rw-r--r-- | meta-oe/recipes-test/pm-qa/pm-qa_git.bb | 7 | 
2 files changed, 75 insertions, 1 deletions
| diff --git a/meta-oe/recipes-test/pm-qa/pm-qa/0001-fix-build-with-gcc-15-Wincompatible-pointer-types-er.patch b/meta-oe/recipes-test/pm-qa/pm-qa/0001-fix-build-with-gcc-15-Wincompatible-pointer-types-er.patch new file mode 100644 index 0000000000..7efd8dd71a --- /dev/null +++ b/meta-oe/recipes-test/pm-qa/pm-qa/0001-fix-build-with-gcc-15-Wincompatible-pointer-types-er.patch | |||
| @@ -0,0 +1,69 @@ | |||
| 1 | From b6b968d1c8fbba79b33d63874b551225e663435e Mon Sep 17 00:00:00 2001 | ||
| 2 | From: "mark.yang" <mark.yang@lge.com> | ||
| 3 | Date: Wed, 2 Apr 2025 16:59:00 +0900 | ||
| 4 | Subject: [PATCH] fix build with gcc-15 -Wincompatible-pointer-types error | ||
| 5 | |||
| 6 | See more details: http://errors.yoctoproject.org/Errors/Details/850314 | ||
| 7 | utils/uevent_reader.c:33:24: error: passing argument 2 of 'signal' from incompatible pointer type [-Wincompatible-pointer-types] | ||
| 8 | 33 | signal(SIGINT, exit_handler); | ||
| 9 | | ^~~~~~~~~~~~ | ||
| 10 | | | | ||
| 11 | | void (*)(void) | ||
| 12 | In file included from utils/uevent_reader.c:4: | ||
| 13 | TOPDIR/tmp/work/core2-64-oe-linux/pm-qa/0.5.2/recipe-sysroot/usr/include/signal.h:88:57: note: expected '__sighandler_t' {aka 'void (*)(int)'} but argument is of type 'void (*)(void)' | ||
| 14 | 88 | extern __sighandler_t signal (int __sig, __sighandler_t __handler) | ||
| 15 | | ~~~~~~~~~~~~~~~^~~~~~~~~ | ||
| 16 | utils/uevent_reader.c:15:6: note: 'exit_handler' declared here | ||
| 17 | 15 | void exit_handler() | ||
| 18 | | ^~~~~~~~~~~~ | ||
| 19 | TOPDIR/tmp/work/core2-64-oe-linux/pm-qa/0.5.2/recipe-sysroot/usr/include/signal.h:72:16: note: '__sighandler_t' declared here | ||
| 20 | 72 | typedef void (*__sighandler_t) (int); | ||
| 21 | | ^~~~~~~~~~~~~~ | ||
| 22 | |||
| 23 | * Set the parameter of exit_handler() to int. | ||
| 24 | Changed to use exit_handler(0). | ||
| 25 | The parameter is not used inside exit_handler() anyway. | ||
| 26 | |||
| 27 | Upstream-Status: Inactive-Upstream [lastrelease: 6 years ago] | ||
| 28 | Signed-off-by: mark.yang <mark.yang@lge.com> | ||
| 29 | --- | ||
| 30 | utils/uevent_reader.c | 8 ++++---- | ||
| 31 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
| 32 | |||
| 33 | diff --git a/utils/uevent_reader.c b/utils/uevent_reader.c | ||
| 34 | index afbb426..75d445c 100644 | ||
| 35 | --- a/utils/uevent_reader.c | ||
| 36 | +++ b/utils/uevent_reader.c | ||
| 37 | @@ -12,7 +12,7 @@ | ||
| 38 | |||
| 39 | FILE *fp; | ||
| 40 | |||
| 41 | -void exit_handler() | ||
| 42 | +void exit_handler(int sig) | ||
| 43 | { | ||
| 44 | fprintf(stdout, "exiting from uevent reader...\n"); | ||
| 45 | fclose(fp); | ||
| 46 | @@ -42,20 +42,20 @@ int main(int argc, char *argv[]) | ||
| 47 | pfd.fd = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_KOBJECT_UEVENT); | ||
| 48 | if (pfd.fd == -1) { | ||
| 49 | perror("error: socket()"); | ||
| 50 | - exit_handler(); | ||
| 51 | + exit_handler(0); | ||
| 52 | } | ||
| 53 | |||
| 54 | if (bind(pfd.fd, (struct sockaddr *) &nls, | ||
| 55 | sizeof(struct sockaddr_nl))) { | ||
| 56 | perror("error : bind()"); | ||
| 57 | - exit_handler(); | ||
| 58 | + exit_handler(0); | ||
| 59 | } | ||
| 60 | |||
| 61 | while (-1 != poll(&pfd, 1, -1)) { | ||
| 62 | int i, len = recv(pfd.fd, buf, sizeof(buf), MSG_DONTWAIT); | ||
| 63 | if (len == -1) { | ||
| 64 | perror("error : recv()"); | ||
| 65 | - exit_handler(); | ||
| 66 | + exit_handler(0); | ||
| 67 | } | ||
| 68 | |||
| 69 | i = 0; | ||
| diff --git a/meta-oe/recipes-test/pm-qa/pm-qa_git.bb b/meta-oe/recipes-test/pm-qa/pm-qa_git.bb index b108218297..482e5694f6 100644 --- a/meta-oe/recipes-test/pm-qa/pm-qa_git.bb +++ b/meta-oe/recipes-test/pm-qa/pm-qa_git.bb | |||
| @@ -10,12 +10,17 @@ BRANCH ?= "master" | |||
| 10 | 10 | ||
| 11 | SRCREV = "05710ec5032be4c8edafb4109d4d908d31243906" | 11 | SRCREV = "05710ec5032be4c8edafb4109d4d908d31243906" | 
| 12 | 12 | ||
| 13 | SRC_URI = "git://git.linaro.org/power/pm-qa.git;protocol=git;branch=${BRANCH}" | 13 | SRC_URI = " \ | 
| 14 | git://git.linaro.org/power/pm-qa.git;protocol=git;branch=${BRANCH} \ | ||
| 15 | file://0001-fix-build-with-gcc-15-Wincompatible-pointer-types-er.patch \ | ||
| 16 | " | ||
| 14 | 17 | ||
| 15 | S = "${WORKDIR}/git" | 18 | S = "${WORKDIR}/git" | 
| 16 | 19 | ||
| 17 | CFLAGS += "-pthread" | 20 | CFLAGS += "-pthread" | 
| 18 | 21 | ||
| 22 | PATCHTOOL = "git" | ||
| 23 | |||
| 19 | do_compile () { | 24 | do_compile () { | 
| 20 | # Find all the .c files in this project and build them. | 25 | # Find all the .c files in this project and build them. | 
| 21 | for x in `find . -name "*.c"` | 26 | for x in `find . -name "*.c"` | 
