Stuart Henderson <[email protected]> wrote:
> x11/nx/opennx
Suggested fix below.
opennx wants to write a timestamp into a configuration file, but
the wxConfigBase framework does not deal with long long. I've
looked a bit into it, but all integer types are mapped to long,
making it problematic to add support for long long. The alternative
approach is to just put the timestamp into a long. (Yes, this will
break on 32-bit platforms in 2038.) Note that the existing code
already crams a long long filesize into a long, too.
All of this is in some smartcard handling code that may not even
be used on OpenBSD.
ok?
Index: patches/patch-opennxApp_cpp
===================================================================
RCS file: /cvs/ports/x11/nx/opennx/patches/patch-opennxApp_cpp,v
retrieving revision 1.5
diff -u -p -r1.5 patch-opennxApp_cpp
--- patches/patch-opennxApp_cpp 15 Nov 2012 10:12:54 -0000 1.5
+++ patches/patch-opennxApp_cpp 16 Aug 2013 22:56:23 -0000
@@ -1,7 +1,9 @@
$OpenBSD: patch-opennxApp_cpp,v 1.5 2012/11/15 10:12:54 jasper Exp $
+wxConfigBase does not support long long.
+
--- opennxApp.cpp.orig Mon Jul 30 20:04:59 2012
-+++ opennxApp.cpp Thu Nov 15 10:37:38 2012
++++ opennxApp.cpp Sat Aug 17 00:44:22 2013
@@ -575,7 +575,7 @@ opennxApp::preInit()
tmp = findExecutable(wxT("cupsd"));
if (tmp.IsEmpty()) {
@@ -11,3 +13,15 @@ $OpenBSD: patch-opennxApp_cpp,v 1.5 2012
NULL
};
int i;
+@@ -754,9 +754,9 @@ 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 mtime = (long)fn.GetModificationTime().GetTicks();
+ long size = fn.GetSize().ToULong();
+ wxConfigBase::Get()->Read(wxT("Config/NxSshStamp"), &last_mtime, 0);
+ wxConfigBase::Get()->Read(wxT("Config/NxSshSize"), &last_size, 0);
--
Christian "naddy" Weisgerber [email protected]