From cbb682e6b86e0b462cef73fdaad61e4be83b06b6 Mon Sep 17 00:00:00 2001
From: Matteo Varalta <matteo.varalta@txtgroup.com>
Date: 周二, 23 4月 2019 17:07:40 +0800
Subject: [PATCH] Porting to Centos 7: xfs file system, cmake 2.8.11 in example, static linking for -lgcc_s

---
 src/library/LicenseReader.cpp |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/library/LicenseReader.cpp b/src/library/LicenseReader.cpp
index 7b1ae65..37274f0 100644
--- a/src/library/LicenseReader.cpp
+++ b/src/library/LicenseReader.cpp
@@ -25,8 +25,6 @@
 #include "public-key.h"
 #include <build_properties.h>
 
-#include "os/os-cpp.h"
-
 namespace license {
 
 const char *FullLicenseInfo::UNUSED_TIME = "0000-00-00";
@@ -92,8 +90,9 @@
 			license->days_left = 999999;
 		} else {
 			strncpy(license->expiry_date, to_date.c_str(), 11);
-			double secs = difftime(time(NULL),
-					seconds_from_epoch(to_date.c_str()));
+			double secs = difftime(
+				seconds_from_epoch(to_date.c_str()),
+				time(NULL));
 			license->days_left = (int) secs / 60 * 60 * 24;
 		}
 	}

--
Gitblit v1.9.1