From 498d5697de89c1467a095597c0ea5bb8624f2be0 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 15 May 2024 19:30:23 -0700 Subject: [PATCH] tac_plus: fix compilation with GCC14 Missing declaration and wrong pointer type. Signed-off-by: Rosen Penev --- net/tac_plus/Makefile | 2 +- net/tac_plus/patches/020-gcc14.patch | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 net/tac_plus/patches/020-gcc14.patch diff --git a/net/tac_plus/Makefile b/net/tac_plus/Makefile index 381a044a61..5d08769670 100644 --- a/net/tac_plus/Makefile +++ b/net/tac_plus/Makefile @@ -3,7 +3,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=tac_plus PKG_VERSION:=4.0.4.28 PKG_REV:=259251e6f1c2d5c98081a43c6f66d9eb2989cfd8 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE_VERSION:=$(PKG_REV) PKG_SOURCE_DATE:=2019.02.11 diff --git a/net/tac_plus/patches/020-gcc14.patch b/net/tac_plus/patches/020-gcc14.patch new file mode 100644 index 0000000000..914c3b4b9d --- /dev/null +++ b/net/tac_plus/patches/020-gcc14.patch @@ -0,0 +1,21 @@ +--- a/tacacs-F4.0.4.28/pwlib.c ++++ b/tacacs-F4.0.4.28/pwlib.c +@@ -354,7 +354,7 @@ etc_passwd_file_verify(char *user, char + * password expiration routines work correctly. + */ + if (spwd->sp_expire > 0) { +- long secs = spwd->sp_expire * 24 * 60 * 60; ++ time_t secs = spwd->sp_expire * 24 * 60 * 60; + char *p = ctime(&secs); + + memcpy(buf, p + 4, 7); +--- a/tacacs-F4.0.4.28/tac_plus.h ++++ b/tacacs-F4.0.4.28/tac_plus.h +@@ -418,6 +418,7 @@ char *cfg_get_host_key(char *); + int cfg_get_host_noenablepwd(char *); + #endif + char *cfg_get_host_prompt(char *); ++int cfg_get_logauthor(void); + char *cfg_get_login_secret(char *, int); + #ifdef MSCHAP + char *cfg_get_mschap_secret(char *, int); -- 2.30.2