git: dceaf660a726 - main - net/opennx: Fix build on armv7
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 08 Nov 2022 01:39:51 UTC
The branch main has been updated by eduardo: URL: https://cgit.FreeBSD.org/ports/commit/?id=dceaf660a726b36ac871827a7bbb70b89930f049 commit dceaf660a726b36ac871827a7bbb70b89930f049 Author: Robert Clausecker <fuz@fuz.su> AuthorDate: 2022-11-08 01:35:21 +0000 Commit: Nuno Teixeira <eduardo@FreeBSD.org> CommitDate: 2022-11-08 01:39:37 +0000 net/opennx: Fix build on armv7 time_t is a long long on armv7, but OpenNX tries to store time stamps into configuration storage that only eats long variables. Cast to long and cross fingers that nobody is going to use this port past 2036. PR: 267618 Approved by: portmgr (blanket: build fix) MFH: 2022Q4 --- net/opennx/Makefile | 2 +- net/opennx/files/patch-opennxApp.cpp | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/net/opennx/Makefile b/net/opennx/Makefile index 74975922a905..3ef59e488b5c 100644 --- a/net/opennx/Makefile +++ b/net/opennx/Makefile @@ -1,6 +1,6 @@ PORTNAME= opennx PORTVERSION= 0.16.0.729 -PORTREVISION= 10 +PORTREVISION= 11 CATEGORIES= net MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/CI-source diff --git a/net/opennx/files/patch-opennxApp.cpp b/net/opennx/files/patch-opennxApp.cpp new file mode 100644 index 000000000000..a4a805af02e6 --- /dev/null +++ b/net/opennx/files/patch-opennxApp.cpp @@ -0,0 +1,22 @@ +--- opennxApp.cpp.orig 2022-11-07 09:51:49 UTC ++++ opennxApp.cpp +@@ -759,7 +759,7 @@ void opennxApp::checkNxSmartCardSupport() + #endif + if (!fn.FileExists()) + return; +- time_t last_mtime; ++ long last_mtime; + long last_size; + time_t mtime = fn.GetModificationTime().GetTicks(); + long size = fn.GetSize().ToULong(); +@@ -767,8 +767,8 @@ void opennxApp::checkNxSmartCardSupport() + wxConfigBase::Get()->Read(wxT("Config/NxSshSize"), &last_size, 0); + wxConfigBase::Get()->Read(wxT("Config/NxSshSmartCardSupport"), &m_bNxSmartCardSupport, false); + +- if ((mtime != last_mtime) || (size != last_size)) { +- wxConfigBase::Get()->Write(wxT("Config/NxSshStamp"), mtime); ++ if ((mtime != (time_t)last_mtime) || (size != last_size)) { ++ wxConfigBase::Get()->Write(wxT("Config/NxSshStamp"), (long)mtime); + wxConfigBase::Get()->Write(wxT("Config/NxSshSize"), size); + wxString nxsshcmd = fn.GetShortPath(); + nxsshcmd << wxT(" -I 0 -V");