diff options
| author | Khem Raj <raj.khem@gmail.com> | 2025-03-11 15:00:58 -0700 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-03-13 11:00:36 +0000 |
| commit | b0241e2582eeeae9c676b79a31905c040c33d57b (patch) | |
| tree | 69d10c1fa7c2245d83a858dffe60c3c94ba873c3 | |
| parent | a1522fd3302f015fbe91b2557d2bca7b93d32d92 (diff) | |
| download | poky-b0241e2582eeeae9c676b79a31905c040c33d57b.tar.gz | |
libtirpc: Fix build with gcc-15/C23
Update declarations to allow building with gcc-15 with C23 std
being default now.
Fixes:
error: conflicting types for 'xdr_opaque_auth
(From OE-Core rev: 567faa5515fc314e2c251c8ee14fe8e4186a3d97)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 files changed, 128 insertions, 1 deletions
diff --git a/meta/recipes-extended/libtirpc/libtirpc/0001-Update-declarations-to-allow-compile-with-gcc-15.patch b/meta/recipes-extended/libtirpc/libtirpc/0001-Update-declarations-to-allow-compile-with-gcc-15.patch new file mode 100644 index 0000000000..7bfe7c2924 --- /dev/null +++ b/meta/recipes-extended/libtirpc/libtirpc/0001-Update-declarations-to-allow-compile-with-gcc-15.patch | |||
| @@ -0,0 +1,64 @@ | |||
| 1 | From b526c0a90953f47d4cbf7ef01e9ac13e9e76904a Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Rudi Heitbaum <rudi@heitbaum.com> | ||
| 3 | Date: Thu, 12 Dec 2024 04:16:02 -0500 | ||
| 4 | Subject: [PATCH 1/2] Update declarations to allow compile with gcc-15 | ||
| 5 | |||
| 6 | This patch fixes some of the compile errors with gcc 15-20241117. | ||
| 7 | |||
| 8 | In addition the follow declarations need to be fixed: | ||
| 9 | sed -n 75,77p libtirpc-1.3.6/src/key_call.c | ||
| 10 | cryptkeyres *(*__key_encryptsession_pk_LOCAL)() = 0; | ||
| 11 | cryptkeyres *(*__key_decryptsession_pk_LOCAL)() = 0; | ||
| 12 | des_block *(*__key_gendes_LOCAL)() = 0; | ||
| 13 | |||
| 14 | Upstream-Status: Backport [https://git.linux-nfs.org/?p=steved/libtirpc.git;a=commit;h=d473f1e1f6ba80bfaee4daa058da159305167323] | ||
| 15 | Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com> | ||
| 16 | Signed-off-by: Steve Dickson <steved@redhat.com> | ||
| 17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 18 | --- | ||
| 19 | src/auth_none.c | 2 +- | ||
| 20 | src/getpublickey.c | 2 +- | ||
| 21 | src/svc_auth_none.c | 4 ++-- | ||
| 22 | 3 files changed, 4 insertions(+), 4 deletions(-) | ||
| 23 | |||
| 24 | diff --git a/src/auth_none.c b/src/auth_none.c | ||
| 25 | index 0b0bbd1..aca6e71 100644 | ||
| 26 | --- a/src/auth_none.c | ||
| 27 | +++ b/src/auth_none.c | ||
| 28 | @@ -62,7 +62,7 @@ static bool_t authnone_validate (AUTH *, struct opaque_auth *); | ||
| 29 | static bool_t authnone_refresh (AUTH *, void *); | ||
| 30 | static void authnone_destroy (AUTH *); | ||
| 31 | |||
| 32 | -extern bool_t xdr_opaque_auth(); | ||
| 33 | +extern bool_t xdr_opaque_auth(XDR *, struct opaque_auth *); | ||
| 34 | |||
| 35 | static struct auth_ops *authnone_ops(); | ||
| 36 | |||
| 37 | diff --git a/src/getpublickey.c b/src/getpublickey.c | ||
| 38 | index be37a24..4e96c7c 100644 | ||
| 39 | --- a/src/getpublickey.c | ||
| 40 | +++ b/src/getpublickey.c | ||
| 41 | @@ -52,7 +52,7 @@ | ||
| 42 | /* | ||
| 43 | * Hack to let ypserv/rpc.nisd use AUTH_DES. | ||
| 44 | */ | ||
| 45 | -int (*__getpublickey_LOCAL)() = 0; | ||
| 46 | +int (*__getpublickey_LOCAL)(const char *, char *) = 0; | ||
| 47 | |||
| 48 | /* | ||
| 49 | * Get somebody's public key | ||
| 50 | diff --git a/src/svc_auth_none.c b/src/svc_auth_none.c | ||
| 51 | index 887e809..5ca98e9 100644 | ||
| 52 | --- a/src/svc_auth_none.c | ||
| 53 | +++ b/src/svc_auth_none.c | ||
| 54 | @@ -37,8 +37,8 @@ | ||
| 55 | |||
| 56 | #include <rpc/rpc.h> | ||
| 57 | |||
| 58 | -static bool_t svcauth_none_destroy(); | ||
| 59 | -static bool_t svcauth_none_wrap(); | ||
| 60 | +static bool_t svcauth_none_destroy(SVCAUTH *); | ||
| 61 | +static bool_t svcauth_none_wrap(SVCAUTH *, XDR *, bool_t (*)(XDR *, ...), char *); | ||
| 62 | |||
| 63 | struct svc_auth_ops svc_auth_none_ops = { | ||
| 64 | svcauth_none_wrap, | ||
diff --git a/meta/recipes-extended/libtirpc/libtirpc/0002-update-signal-and-key_call-declarations-to-allow-com.patch b/meta/recipes-extended/libtirpc/libtirpc/0002-update-signal-and-key_call-declarations-to-allow-com.patch new file mode 100644 index 0000000000..83e2105a1a --- /dev/null +++ b/meta/recipes-extended/libtirpc/libtirpc/0002-update-signal-and-key_call-declarations-to-allow-com.patch | |||
| @@ -0,0 +1,60 @@ | |||
| 1 | From 55452e6ae71869880f8c85d5dba9aa24d7147d8b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Rudi Heitbaum <rudi@heitbaum.com> | ||
| 3 | Date: Thu, 2 Jan 2025 08:46:24 -0500 | ||
| 4 | Subject: [PATCH 2/2] update signal and key_call declarations to allow compile | ||
| 5 | with gcc-15 | ||
| 6 | |||
| 7 | Follow up patch addressing the following declarations: | ||
| 8 | sed -n 75,77p libtirpc-1.3.6/src/key_call.c | ||
| 9 | cryptkeyres *(*__key_encryptsession_pk_LOCAL)() = 0; | ||
| 10 | cryptkeyres *(*__key_decryptsession_pk_LOCAL)() = 0; | ||
| 11 | des_block *(*__key_gendes_LOCAL)() = 0; | ||
| 12 | |||
| 13 | Upstream-Status: Backport [https://git.linux-nfs.org/?p=steved/libtirpc.git;a=commit;h=240ee6c774729c9c24812aa8912f1fcf8996b162] | ||
| 14 | Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com> | ||
| 15 | Signed-off-by: Steve Dickson <steved@redhat.com> | ||
| 16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 17 | --- | ||
| 18 | src/auth_time.c | 4 ++-- | ||
| 19 | src/key_call.c | 6 +++--- | ||
| 20 | 2 files changed, 5 insertions(+), 5 deletions(-) | ||
| 21 | |||
| 22 | diff --git a/src/auth_time.c b/src/auth_time.c | ||
| 23 | index 936dd76..c21b1df 100644 | ||
| 24 | --- a/src/auth_time.c | ||
| 25 | +++ b/src/auth_time.c | ||
| 26 | @@ -248,7 +248,7 @@ __rpc_get_time_offset(td, srv, thost, uaddr, netid) | ||
| 27 | char ut[64], ipuaddr[64]; | ||
| 28 | endpoint teps[32]; | ||
| 29 | nis_server tsrv; | ||
| 30 | - void (*oldsig)() = NULL; /* old alarm handler */ | ||
| 31 | + void (*oldsig)(int) = NULL; /* old alarm handler */ | ||
| 32 | struct sockaddr_in sin; | ||
| 33 | int s = RPC_ANYSOCK; | ||
| 34 | socklen_t len; | ||
| 35 | @@ -417,7 +417,7 @@ __rpc_get_time_offset(td, srv, thost, uaddr, netid) | ||
| 36 | } else { | ||
| 37 | int res; | ||
| 38 | |||
| 39 | - oldsig = (void (*)())signal(SIGALRM, alarm_hndler); | ||
| 40 | + oldsig = (void (*)(int))signal(SIGALRM, alarm_hndler); | ||
| 41 | saw_alarm = 0; /* global tracking the alarm */ | ||
| 42 | alarm(20); /* only wait 20 seconds */ | ||
| 43 | res = connect(s, (struct sockaddr *)&sin, sizeof(sin)); | ||
| 44 | diff --git a/src/key_call.c b/src/key_call.c | ||
| 45 | index 9f4b1d2..43f990e 100644 | ||
| 46 | --- a/src/key_call.c | ||
| 47 | +++ b/src/key_call.c | ||
| 48 | @@ -72,9 +72,9 @@ | ||
| 49 | * implementations of these functions, and to call those in key_call(). | ||
| 50 | */ | ||
| 51 | |||
| 52 | -cryptkeyres *(*__key_encryptsession_pk_LOCAL)() = 0; | ||
| 53 | -cryptkeyres *(*__key_decryptsession_pk_LOCAL)() = 0; | ||
| 54 | -des_block *(*__key_gendes_LOCAL)() = 0; | ||
| 55 | +cryptkeyres *(*__key_encryptsession_pk_LOCAL)(uid_t, char *) = 0; | ||
| 56 | +cryptkeyres *(*__key_decryptsession_pk_LOCAL)(uid_t, char *) = 0; | ||
| 57 | +des_block *(*__key_gendes_LOCAL)(uid_t, char *) = 0; | ||
| 58 | |||
| 59 | static int key_call( u_long, xdrproc_t, void *, xdrproc_t, void *); | ||
| 60 | |||
diff --git a/meta/recipes-extended/libtirpc/libtirpc_1.3.6.bb b/meta/recipes-extended/libtirpc/libtirpc_1.3.6.bb index 6834e06c25..6ea9a725db 100644 --- a/meta/recipes-extended/libtirpc/libtirpc_1.3.6.bb +++ b/meta/recipes-extended/libtirpc/libtirpc_1.3.6.bb | |||
| @@ -9,7 +9,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=f835cce8852481e4b2bbbdd23b5e47f3 \ | |||
| 9 | 9 | ||
| 10 | PROVIDES = "virtual/librpc" | 10 | PROVIDES = "virtual/librpc" |
| 11 | 11 | ||
| 12 | SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2" | 12 | SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2 \ |
| 13 | file://0001-Update-declarations-to-allow-compile-with-gcc-15.patch \ | ||
| 14 | file://0002-update-signal-and-key_call-declarations-to-allow-com.patch \ | ||
| 15 | " | ||
| 13 | UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/libtirpc/files/libtirpc/" | 16 | UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/libtirpc/files/libtirpc/" |
| 14 | UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)/" | 17 | UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)/" |
| 15 | SRC_URI[sha256sum] = "bbd26a8f0df5690a62a47f6aa30f797f3ef8d02560d1bc449a83066b5a1d3508" | 18 | SRC_URI[sha256sum] = "bbd26a8f0df5690a62a47f6aa30f797f3ef8d02560d1bc449a83066b5a1d3508" |
