Package not found: devel:languages:python/python-djvulibre

File pacemaker-portability-difference-of-time_t-values-by-difftime.patch of Package pacemaker.14737

commit a0c0a969bf37312f35c7380e18506f783d23071e
Author: Ferenc Wágner <wferi@debian.org>
Date:   Sun Nov 5 20:59:05 2017 +0100

    portability: the difference of time_t values is given by difftime()
    
    The original code didn't compile on x32, where time_t is long long int.
    
    Signed-off-by: Ferenc Wágner <wferi@debian.org>

Index: pacemaker/lib/common/utils.c
===================================================================
--- pacemaker.orig/lib/common/utils.c
+++ pacemaker/lib/common/utils.c
@@ -2413,10 +2413,10 @@ crm_compress_string(const char *data, in
 #ifdef CLOCK_MONOTONIC
     clock_gettime(CLOCK_MONOTONIC, &after_t);
 
-    crm_trace("Compressed %d bytes into %d (ratio %d:1) in %ldms",
+    crm_trace("Compressed %d bytes into %d (ratio %d:1) in %.0fms",
              length, *result_len, length / (*result_len),
-             (after_t.tv_sec - before_t.tv_sec) * 1000 + (after_t.tv_nsec -
-                                                          before_t.tv_nsec) / 1000000);
+             difftime (after_t.tv_sec, before_t.tv_sec) * 1000 +
+             (after_t.tv_nsec - before_t.tv_nsec) / 1e6);
 #else
     crm_trace("Compressed %d bytes into %d (ratio %d:1)",
              length, *result_len, length / (*result_len));
openSUSE Build Service is sponsored by