diff options
| author | Khem Raj <raj.khem@gmail.com> | 2024-12-10 13:45:36 +0100 |
|---|---|---|
| committer | Armin Kuster <akuster808@gmail.com> | 2024-12-31 08:56:41 -0500 |
| commit | e137ee78b538aa56b9ca6aa6d4fb81e595067042 (patch) | |
| tree | 25172f5a0eb38c89219ff550a592bdbeddba92ba /meta-oe | |
| parent | 62119b2643ba00895dbf42b5ae770d3a8b9cee21 (diff) | |
| download | meta-openembedded-e137ee78b538aa56b9ca6aa6d4fb81e595067042.tar.gz | |
nspr: Fix build with clang16
* also needed for nspr-native build with gcc-14 on host
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Diffstat (limited to 'meta-oe')
| -rw-r--r-- | meta-oe/recipes-support/nspr/nspr/0001-Fix-Wincompatible-function-pointer-types.patch | 39 | ||||
| -rw-r--r-- | meta-oe/recipes-support/nspr/nspr_4.29.bb | 1 |
2 files changed, 40 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/nspr/nspr/0001-Fix-Wincompatible-function-pointer-types.patch b/meta-oe/recipes-support/nspr/nspr/0001-Fix-Wincompatible-function-pointer-types.patch new file mode 100644 index 0000000000..8515075fe0 --- /dev/null +++ b/meta-oe/recipes-support/nspr/nspr/0001-Fix-Wincompatible-function-pointer-types.patch | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | From d24dc9bebaefbd8abf32707bad5efc0c811c0cd4 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Wed, 18 Jan 2023 13:04:56 -0800 | ||
| 4 | Subject: [PATCH] Fix -Wincompatible-function-pointer-types | ||
| 5 | |||
| 6 | Fixes warnings with clang16 | ||
| 7 | testfile.c:576:31: error: incompatible function pointer types passing 'PRInt32 (void *)' (aka 'int (void *)') to parameter of type 'void (*)(void *)' [-Wincompatible-function-pointe r-types] | ||
| 8 | |||
| 9 | Upstream-Status: Pending | ||
| 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 11 | --- | ||
| 12 | pr/tests/testfile.c | 4 ++-- | ||
| 13 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 14 | |||
| 15 | diff --git a/pr/tests/testfile.c b/pr/tests/testfile.c | ||
| 16 | index 79d8a05..42aa6a7 100644 | ||
| 17 | --- a/pr/tests/testfile.c | ||
| 18 | +++ b/pr/tests/testfile.c | ||
| 19 | @@ -123,7 +123,7 @@ PRThread* create_new_thread(PRThreadType type, | ||
| 20 | if (native_thread) { | ||
| 21 | #if defined(_PR_PTHREADS) | ||
| 22 | pthread_t tid; | ||
| 23 | - if (!pthread_create(&tid, NULL, start, arg)) { | ||
| 24 | + if (!pthread_create(&tid, NULL, (void*(*)(void*))start, arg)) { | ||
| 25 | return((PRThread *) tid); | ||
| 26 | } | ||
| 27 | else { | ||
| 28 | @@ -573,7 +573,7 @@ static PRInt32 RunDirTest(void) | ||
| 29 | |||
| 30 | thrarg.done= 0; | ||
| 31 | t = create_new_thread(PR_USER_THREAD, | ||
| 32 | - DirTest, &thrarg, | ||
| 33 | + (void (*)(void *))DirTest, &thrarg, | ||
| 34 | PR_PRIORITY_NORMAL, | ||
| 35 | PR_LOCAL_THREAD, | ||
| 36 | PR_UNJOINABLE_THREAD, | ||
| 37 | -- | ||
| 38 | 2.39.1 | ||
| 39 | |||
diff --git a/meta-oe/recipes-support/nspr/nspr_4.29.bb b/meta-oe/recipes-support/nspr/nspr_4.29.bb index b60de08d2a..c9215fc275 100644 --- a/meta-oe/recipes-support/nspr/nspr_4.29.bb +++ b/meta-oe/recipes-support/nspr/nspr_4.29.bb | |||
| @@ -12,6 +12,7 @@ SRC_URI = "http://ftp.mozilla.org/pub/nspr/releases/v${PV}/src/nspr-${PV}.tar.gz | |||
| 12 | file://0002-Add-nios2-support.patch \ | 12 | file://0002-Add-nios2-support.patch \ |
| 13 | file://0001-md-Fix-build-with-musl.patch \ | 13 | file://0001-md-Fix-build-with-musl.patch \ |
| 14 | file://Makefile.in-remove-_BUILD_STRING-and-_BUILD_TIME.patch \ | 14 | file://Makefile.in-remove-_BUILD_STRING-and-_BUILD_TIME.patch \ |
| 15 | file://0001-Fix-Wincompatible-function-pointer-types.patch \ | ||
| 15 | file://nspr.pc.in \ | 16 | file://nspr.pc.in \ |
| 16 | " | 17 | " |
| 17 | 18 | ||
