Submitted By: DJ Lucas <dj@linuxfromscratch.org>
Date: 2025-05-31
Initial Package Version: 1.3.6
Upstream Status: Applied
Origin: https://git.linux-nfs.org/?p=steved/libtirpc.git;a=patch;h=240ee6c7747299c9c24812aa8912f1fcf8996b162
https://git.linux-nfs.org/?p=steved/libtirpc.git;a=patch;h=d473f1e1f6ba880bfaee4daa058da159305167323
Description: Fixes build with GCC-15.
From d473f1e1f6ba80bfaee4daa058da159305167323 Mon Sep 17 00:00:00 2001
From: Rudi Heitbaum <rudi@heitbaum.com>
Date: Thu, 12 Dec 2024 04:16:02 -0500
Subject: [PATCH] Update declarations to allow compile with gcc-15
This patch fixes some of the compile errors with gcc 15-20241117.
In addition the follow declarations need to be fixed:
sed -n 75,77p libtirpc-1.3.6/src/key_call.c
cryptkeyres *(*__key_encryptsession_pk_LOCAL)() = 0;
cryptkeyres *(*__key_decryptsession_pk_LOCAL)() = 0;
des_block *(*__key_gendes_LOCAL)() = 0;
Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
---
src/auth_none.c | 2 +-
src/getpublickey.c | 2 +-
src/svc_auth_none.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/auth_none.c b/src/auth_none.c
index 0b0bbd1..aca6e71 100644
|
a
|
b
|
static bool_t authnone_validate (AUTH *, struct opaque_auth *);
|
| 62 | 62 | static bool_t authnone_refresh (AUTH *, void *); |
| 63 | 63 | static void authnone_destroy (AUTH *); |
| 64 | 64 | |
| 65 | | extern bool_t xdr_opaque_auth(); |
| | 65 | extern bool_t xdr_opaque_auth(XDR *, struct opaque_auth *); |
| 66 | 66 | |
| 67 | 67 | static struct auth_ops *authnone_ops(); |
| 68 | 68 | |
diff --git a/src/getpublickey.c b/src/getpublickey.c
index be37a24..4e96c7c 100644
|
a
|
b
|
|
| 52 | 52 | /* |
| 53 | 53 | * Hack to let ypserv/rpc.nisd use AUTH_DES. |
| 54 | 54 | */ |
| 55 | | int (*__getpublickey_LOCAL)() = 0; |
| | 55 | int (*__getpublickey_LOCAL)(const char *, char *) = 0; |
| 56 | 56 | |
| 57 | 57 | /* |
| 58 | 58 | * Get somebody's public key |
diff --git a/src/svc_auth_none.c b/src/svc_auth_none.c
index 887e809..5ca98e9 100644
|
a
|
b
|
|
| 37 | 37 | |
| 38 | 38 | #include <rpc/rpc.h> |
| 39 | 39 | |
| 40 | | static bool_t svcauth_none_destroy(); |
| 41 | | static bool_t svcauth_none_wrap(); |
| | 40 | static bool_t svcauth_none_destroy(SVCAUTH *); |
| | 41 | static bool_t svcauth_none_wrap(SVCAUTH *, XDR *, bool_t (*)(XDR *, ...), char *); |
| 42 | 42 | |
| 43 | 43 | struct svc_auth_ops svc_auth_none_ops = { |
| 44 | 44 | svcauth_none_wrap, |
From 240ee6c774729c9c24812aa8912f1fcf8996b162 Mon Sep 17 00:00:00 2001
From: Rudi Heitbaum <rudi@heitbaum.com>
Date: Thu, 2 Jan 2025 08:46:24 -0500
Subject: [PATCH] update signal and key_call declarations to allow compile with
gcc-15
Follow up patch addressing the following declarations:
sed -n 75,77p libtirpc-1.3.6/src/key_call.c
cryptkeyres *(*__key_encryptsession_pk_LOCAL)() = 0;
cryptkeyres *(*__key_decryptsession_pk_LOCAL)() = 0;
des_block *(*__key_gendes_LOCAL)() = 0;
Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
---
src/auth_time.c | 4 ++--
src/key_call.c | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/auth_time.c b/src/auth_time.c
index 936dd76..c21b1df 100644
|
a
|
b
|
__rpc_get_time_offset(td, srv, thost, uaddr, netid)
|
| 248 | 248 | char ut[64], ipuaddr[64]; |
| 249 | 249 | endpoint teps[32]; |
| 250 | 250 | nis_server tsrv; |
| 251 | | void (*oldsig)() = NULL; /* old alarm handler */ |
| | 251 | void (*oldsig)(int) = NULL; /* old alarm handler */ |
| 252 | 252 | struct sockaddr_in sin; |
| 253 | 253 | int s = RPC_ANYSOCK; |
| 254 | 254 | socklen_t len; |
| … |
… |
__rpc_get_time_offset(td, srv, thost, uaddr, netid)
|
| 417 | 417 | } else { |
| 418 | 418 | int res; |
| 419 | 419 | |
| 420 | | oldsig = (void (*)())signal(SIGALRM, alarm_hndler); |
| | 420 | oldsig = (void (*)(int))signal(SIGALRM, alarm_hndler); |
| 421 | 421 | saw_alarm = 0; /* global tracking the alarm */ |
| 422 | 422 | alarm(20); /* only wait 20 seconds */ |
| 423 | 423 | res = connect(s, (struct sockaddr *)&sin, sizeof(sin)); |
diff --git a/src/key_call.c b/src/key_call.c
index 9f4b1d2..43f990e 100644
|
a
|
b
|
|
| 72 | 72 | * implementations of these functions, and to call those in key_call(). |
| 73 | 73 | */ |
| 74 | 74 | |
| 75 | | cryptkeyres *(*__key_encryptsession_pk_LOCAL)() = 0; |
| 76 | | cryptkeyres *(*__key_decryptsession_pk_LOCAL)() = 0; |
| 77 | | des_block *(*__key_gendes_LOCAL)() = 0; |
| | 75 | cryptkeyres *(*__key_encryptsession_pk_LOCAL)(uid_t, char *) = 0; |
| | 76 | cryptkeyres *(*__key_decryptsession_pk_LOCAL)(uid_t, char *) = 0; |
| | 77 | des_block *(*__key_gendes_LOCAL)(uid_t, char *) = 0; |
| 78 | 78 | |
| 79 | 79 | static int key_call( u_long, xdrproc_t, void *, xdrproc_t, void *); |
| 80 | 80 | |