1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-03 11:12:13 +00:00

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
This commit is contained in:
Robert Clausecker 2022-11-08 01:35:21 +00:00 committed by Nuno Teixeira
parent 1a675177e3
commit dceaf660a7
2 changed files with 23 additions and 1 deletions

View File

@ -1,6 +1,6 @@
PORTNAME= opennx
PORTVERSION= 0.16.0.729
PORTREVISION= 10
PORTREVISION= 11
CATEGORIES= net
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/CI-source

View File

@ -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");