diff options
| author | Khem Raj <raj.khem@gmail.com> | 2025-08-22 00:43:04 +0200 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2025-09-01 08:30:56 -0700 |
| commit | e2e54e0354ed375a18bcc0758b7edb395b9a68bd (patch) | |
| tree | 5f4b1c14360aa7f06fa9d4c15da126eadbfc8563 /meta | |
| parent | 765333686d4c1921d8d4727ce3e439e294236492 (diff) | |
| download | poky-e2e54e0354ed375a18bcc0758b7edb395b9a68bd.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: 65036ab0a519c14338fb26ac8162d159d965da2b)
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>
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta')
3 files changed, 126 insertions, 0 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.4.bb b/meta/recipes-extended/libtirpc/libtirpc_1.3.4.bb index aa526e9e1c..198cefacfb 100644 --- a/meta/recipes-extended/libtirpc/libtirpc_1.3.4.bb +++ b/meta/recipes-extended/libtirpc/libtirpc_1.3.4.bb | |||
| @@ -11,6 +11,8 @@ 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://ipv6.patch \ | 13 | file://ipv6.patch \ |
| 14 | file://0001-Update-declarations-to-allow-compile-with-gcc-15.patch \ | ||
| 15 | file://0002-update-signal-and-key_call-declarations-to-allow-com.patch \ | ||
| 14 | " | 16 | " |
| 15 | UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/libtirpc/files/libtirpc/" | 17 | UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/libtirpc/files/libtirpc/" |
| 16 | UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)/" | 18 | UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)/" |
