diff options
Diffstat (limited to 'src/common.h')
-rw-r--r--[-rwxr-xr-x] | src/common.h | 12 |
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 */ |