Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE
pacemaker.8750
pacemaker-portability-difference-of-time_t-valu...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pacemaker-portability-difference-of-time_t-values-by-difftime.patch of Package pacemaker.8750
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> diff --git a/lib/common/strings.c b/lib/common/strings.c index 41ee0d433..26dc793b8 100644 --- a/lib/common/strings.c +++ b/lib/common/strings.c @@ -444,10 +444,10 @@ crm_compress_string(const char *data, int length, int max, char **result, unsign #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));
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor