include $(TOPDIR)/rules.mk
PKG_NAME:=libtirpc
-PKG_VERSION:=1.3.4
-PKG_RELEASE:=2
+PKG_VERSION:=1.3.6
+PKG_RELEASE:=1
PKG_SOURCE_URL:=@SF/libtirpc
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
-PKG_HASH:=1e0b0c7231c5fa122e06c0609a76723664d068b0dba3b8219b63e6340b347860
+PKG_HASH:=bbd26a8f0df5690a62a47f6aa30f797f3ef8d02560d1bc449a83066b5a1d3508
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=COPYING
--- /dev/null
+From d473f1e1f6ba80bfaee4daa058da159305167323 Mon Sep 17 00:00:00 2001
+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;
+
+---
+ src/auth_none.c | 2 +-
+ src/getpublickey.c | 2 +-
+ src/svc_auth_none.c | 4 ++--
+ 3 files changed, 4 insertions(+), 4 deletions(-)
+
+--- a/src/auth_none.c
++++ b/src/auth_none.c
+@@ -62,7 +62,7 @@ static bool_t authnone_validate (AUTH *,
+ static bool_t authnone_refresh (AUTH *, void *);
+ static void authnone_destroy (AUTH *);
+
+-extern bool_t xdr_opaque_auth();
++extern bool_t xdr_opaque_auth(XDR *, struct opaque_auth *);
+
+ static struct auth_ops *authnone_ops();
+
+--- a/src/getpublickey.c
++++ b/src/getpublickey.c
+@@ -52,7 +52,7 @@
+ /*
+ * Hack to let ypserv/rpc.nisd use AUTH_DES.
+ */
+-int (*__getpublickey_LOCAL)() = 0;
++int (*__getpublickey_LOCAL)(const char *, char *) = 0;
+
+ /*
+ * Get somebody's public key
+--- a/src/svc_auth_none.c
++++ b/src/svc_auth_none.c
+@@ -37,8 +37,8 @@
+
+ #include <rpc/rpc.h>
+
+-static bool_t svcauth_none_destroy();
+-static bool_t svcauth_none_wrap();
++static bool_t svcauth_none_destroy(SVCAUTH *);
++static bool_t svcauth_none_wrap(SVCAUTH *, XDR *, bool_t (*)(XDR *, ...), char *);
+
+ struct svc_auth_ops svc_auth_none_ops = {
+ svcauth_none_wrap,
+++ /dev/null
---- a/tirpc/reentrant.h
-+++ b/tirpc/reentrant.h
-@@ -36,7 +36,7 @@
- * These definitions are only guaranteed to be valid on Linux.
- */
-
--#if defined(__linux__)
-+#if defined(__linux__) || defined(__MACH__)
-
- #include <pthread.h>
-
---- a/tirpc/rpc/rpcent.h
-+++ b/tirpc/rpc/rpcent.h
-@@ -50,7 +50,7 @@ extern "C" {
-
- /* These are defined in /usr/include/rpc/netdb.h, unless we are using
- the C library without RPC support. */
--#if defined(__UCLIBC__) && !defined(__UCLIBC_HAS_RPC__) || !defined(__GLIBC__)
-+#if (defined(__UCLIBC__) && !defined(__UCLIBC_HAS_RPC__) || !defined(__GLIBC__)) && !defined(__MACH__)
- struct rpcent {
- char *r_name; /* name of server for this rpc program */
- char **r_aliases; /* alias list */
---- a/src/rpc_com.h
-+++ b/src/rpc_com.h
-@@ -63,6 +63,14 @@ void __xprt_set_raddr(SVCXPRT *, const s
-
- extern int __svc_maxrec;
-
-+#ifndef SOL_IP
-+#define SOL_IP IPPROTO_IP
-+#endif
-+
-+#ifndef SOL_IPV6
-+#define SOL_IPV6 IPPROTO_IPV6
-+#endif
-+
- #ifdef __cplusplus
- }
- #endif
---- a/src/svc_dg.c
-+++ b/src/svc_dg.c
-@@ -37,6 +37,11 @@
- *
- * Does some caching in the hopes of achieving execute-at-most-once semantics.
- */
-+
-+#ifdef __APPLE__
-+#define __APPLE_USE_RFC_3542
-+#endif
-+
- #include <pthread.h>
- #include <reentrant.h>
- #include <sys/types.h>
---- a/src/svc_raw.c
-+++ b/src/svc_raw.c
-@@ -43,6 +43,7 @@
- #include <sys/types.h>
- #include <rpc/raw.h>
- #include <stdlib.h>
-+#include <string.h>
-
- #ifndef UDPMSGSIZE
- #define UDPMSGSIZE 8800
---- a/src/getpeereid.c
-+++ b/src/getpeereid.c
-@@ -29,12 +29,17 @@
- #include <sys/socket.h>
- #include <sys/un.h>
-
-+#if __APPLE__ || __FreeBSD__
-+#include <sys/ucred.h>
-+#endif
-+
- #include <errno.h>
- #include <unistd.h>
-
- int
- getpeereid(int s, uid_t *euid, gid_t *egid)
- {
-+#if defined(SO_PEERCRED)
- struct ucred uc;
- socklen_t uclen;
- int error;
-@@ -48,4 +53,19 @@ getpeereid(int s, uid_t *euid, gid_t *eg
- *euid = uc.uid;
- *egid = uc.gid;
- return (0);
-+#elif defined(LOCAL_PEERCRED)
-+ struct xucred uc;
-+ socklen_t uclen;
-+ int error;
-+
-+ uclen = sizeof(uc);
-+ error = getsockopt(s, SOL_LOCAL, LOCAL_PEERCRED, &uc, &uclen); /* SCM_CREDENTIALS */
-+ if (error != 0)
-+ return (error);
-+ *euid = uc.cr_uid;
-+ *egid = uc.cr_gid;
-+ return (0);
-+#else
-+ return (ENOTSUP);
-+#endif
- }
--- /dev/null
+From 240ee6c774729c9c24812aa8912f1fcf8996b162 Mon Sep 17 00:00:00 2001
+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;
+
+---
+ src/auth_time.c | 4 ++--
+ src/key_call.c | 6 +++---
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+--- a/src/auth_time.c
++++ b/src/auth_time.c
+@@ -248,7 +248,7 @@ __rpc_get_time_offset(td, srv, thost, ua
+ char ut[64], ipuaddr[64];
+ endpoint teps[32];
+ nis_server tsrv;
+- void (*oldsig)() = NULL; /* old alarm handler */
++ void (*oldsig)(int) = NULL; /* old alarm handler */
+ struct sockaddr_in sin;
+ int s = RPC_ANYSOCK;
+ socklen_t len;
+@@ -417,7 +417,7 @@ __rpc_get_time_offset(td, srv, thost, ua
+ } else {
+ int res;
+
+- oldsig = (void (*)())signal(SIGALRM, alarm_hndler);
++ oldsig = (void (*)(int))signal(SIGALRM, alarm_hndler);
+ saw_alarm = 0; /* global tracking the alarm */
+ alarm(20); /* only wait 20 seconds */
+ res = connect(s, (struct sockaddr *)&sin, sizeof(sin));
+--- a/src/key_call.c
++++ b/src/key_call.c
+@@ -72,9 +72,9 @@
+ * implementations of these functions, and to call those in key_call().
+ */
+
+-cryptkeyres *(*__key_encryptsession_pk_LOCAL)() = 0;
+-cryptkeyres *(*__key_decryptsession_pk_LOCAL)() = 0;
+-des_block *(*__key_gendes_LOCAL)() = 0;
++cryptkeyres *(*__key_encryptsession_pk_LOCAL)(uid_t, char *) = 0;
++cryptkeyres *(*__key_decryptsession_pk_LOCAL)(uid_t, char *) = 0;
++des_block *(*__key_gendes_LOCAL)(uid_t, char *) = 0;
+
+ static int key_call( u_long, xdrproc_t, void *, xdrproc_t, void *);
+