This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[PATCH 4/4] cache.cxx: Fix errors on x32 builds
- From: Richard Purdie <richard dot purdie at linuxfoundation dot org>
- To: systemtap at sourceware dot org
- Cc: Aníbal Limón <anibal dot limon at linux dot intel dot com>
- Date: Thu, 5 Sep 2019 14:41:54 +0100
- Subject: [PATCH 4/4] cache.cxx: Fix errors on x32 builds
- References: <20190905134154.5478-1-richard.purdie@linuxfoundation.org>
Fix time_t print because in x32 ABI is long long int instead of long int.
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
cache.cxx | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/cache.cxx b/cache.cxx
index 3546b3037..19c77ca0c 100644
--- a/cache.cxx
+++ b/cache.cxx
@@ -294,7 +294,11 @@ clean_cache(systemtap_session& s)
{
//interval not passed, don't continue
if (s.verbose > 1)
+#if defined(__x86_64__) && defined (__ILP32__)
+ clog << _F("Cache cleaning skipped, interval not reached %lld s / %lu s.",
+#else
clog << _F("Cache cleaning skipped, interval not reached %lu s / %lu s.",
+#endif
(current_time.tv_sec-sb.st_mtime), cache_clean_interval) << endl;
return;
}
@@ -302,7 +306,11 @@ clean_cache(systemtap_session& s)
{
//interval reached, continue
if (s.verbose > 1)
+#if defined(__x86_64__) && defined (__ILP32__)
+ clog << _F("Cleaning cache, interval reached %lld s > %lu s.",
+#else
clog << _F("Cleaning cache, interval reached %lu s > %lu s.",
+#endif
(current_time.tv_sec-sb.st_mtime), cache_clean_interval) << endl;
}
--
2.17.1