summaryrefslogtreecommitdiffstats
path: root/src/common.h
diff options
context:
space:
mode:
authorLennart Weller <lhw@ring0.de>2016-04-21 12:27:29 +0000
committerLennart Weller <lhw@ring0.de>2016-04-21 12:27:29 +0000
commit30b94862648cdbf4f537337d2e2f01c369a9dee9 (patch)
treef0219dd8bd744fc09899bd0266402e05a4bff854 /src/common.h
parentImported Upstream version 1.0.0 (diff)
downloadnetdata-30b94862648cdbf4f537337d2e2f01c369a9dee9.tar.xz
netdata-30b94862648cdbf4f537337d2e2f01c369a9dee9.zip
Imported Upstream version 1.1.0upstream/1.1.0
Diffstat (limited to 'src/common.h')
-rw-r--r--[-rwxr-xr-x]src/common.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/common.h b/src/common.h
index 9d8836f8b..e9987af72 100755..100644
--- a/src/common.h
+++ b/src/common.h
@@ -1,3 +1,6 @@
+#include <sys/time.h>
+#include <sys/resource.h>
+
#ifndef NETDATA_COMMON_H
#define NETDATA_COMMON_H 1
@@ -12,6 +15,8 @@
#define abs(x) ((x < 0)? -x : x)
#define usecdiff(now, last) (((((now)->tv_sec * 1000000ULL) + (now)->tv_usec) - (((last)->tv_sec * 1000000ULL) + (last)->tv_usec)))
+extern void netdata_fix_id(char *s);
+
extern uint32_t simple_hash(const char *name);
extern void strreverse(char* begin, char* end);
extern char *mystrsep(char **ptr, char *s);
@@ -32,4 +37,11 @@ extern void get_HZ(void);
extern pid_t gettid(void);
+/* fix for alpine linux */
+#ifndef RUSAGE_THREAD
+#ifdef RUSAGE_CHILDREN
+#define RUSAGE_THREAD RUSAGE_CHILDREN
+#endif
+#endif
+
#endif /* NETDATA_COMMON_H */