X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fexec.c;h=3f68e8bbcf1ab26d6f195d80c5ec0213c562a732;hb=f2daf5deea1d50dbb834cffa0c8106b5456c9d82;hp=cb6844b86ce928696f8111b316fd61cf1dfd4704;hpb=103f05e098865196fc5f28df51e99b64fd6b5202;p=collectd.git diff --git a/src/exec.c b/src/exec.c index cb6844b8..3f68e8bb 100644 --- a/src/exec.c +++ b/src/exec.c @@ -23,6 +23,7 @@ * Peter Holik **/ +#define _DEFAULT_SOURCE #define _BSD_SOURCE /* For setgroups */ #include "collectd.h" @@ -744,8 +745,8 @@ static void *exec_notification_one (void *arg) /* {{{ */ fprintf (fh, "Severity: %s\n" - "Time: %u\n", - severity, (unsigned int)CDTIME_T_TO_TIME_T(n->time)); + "Time: %.3f\n", + severity, CDTIME_T_TO_DOUBLE (n->time)); /* Print the optional fields */ if (strlen (n->host) > 0)