projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
serial plugin: Fix -Wshorten-64-to-32 warning.
[collectd.git]
/
src
/
collectd-tg.c
diff --git
a/src/collectd-tg.c
b/src/collectd-tg.c
index
501567d
..
80473e0
100644
(file)
--- a/
src/collectd-tg.c
+++ b/
src/collectd-tg.c
@@
-28,18
+28,6
@@
# include "config.h"
#endif
# include "config.h"
#endif
-#ifndef _ISOC99_SOURCE
-# define _ISOC99_SOURCE
-#endif
-
-#ifndef _POSIX_C_SOURCE
-# define _POSIX_C_SOURCE 200809L
-#endif
-
-#ifndef _XOPEN_SOURCE
-# define _XOPEN_SOURCE 700
-#endif
-
#if !__GNUC__
# define __attribute__(x) /**/
#endif
#if !__GNUC__
# define __attribute__(x) /**/
#endif
@@
-117,7
+105,7
@@
static double dtime (void) /* {{{ */
struct timespec ts = { 0 };
if (clock_gettime (CLOCK_MONOTONIC, &ts) != 0)
struct timespec ts = { 0 };
if (clock_gettime (CLOCK_MONOTONIC, &ts) != 0)
-
return NAN
;
+
perror ("clock_gettime")
;
return ((double) ts.tv_sec) + (((double) ts.tv_nsec) / 1e9);
} /* }}} double dtime */
return ((double) ts.tv_sec) + (((double) ts.tv_nsec) / 1e9);
} /* }}} double dtime */