aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Clausecker <fuz@fuz.su>2022-11-08 01:35:21 +0000
committerNuno Teixeira <eduardo@FreeBSD.org>2022-11-08 01:41:07 +0000
commit0a6cda3b68cba83831c6e5f9fb434e8f892e7d2a (patch)
treec48cf6ce611993a3fd2bd76d9c4d73dd8bc90582
parentb0110242ecb8bc9352277c0a306e7a0f4da2ac81 (diff)
downloadports-0a6cda3b68cba83831c6e5f9fb434e8f892e7d2a.tar.gz
ports-0a6cda3b68cba83831c6e5f9fb434e8f892e7d2a.zip
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 (cherry picked from commit dceaf660a726b36ac871827a7bbb70b89930f049)
-rw-r--r--net/opennx/Makefile2
-rw-r--r--net/opennx/files/patch-opennxApp.cpp22
2 files changed, 23 insertions, 1 deletions
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");