summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f8af723)
raw | patch | inline | side by side (parent: f8af723)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 18 Mar 2016 11:59:03 +0000 (12:59 +0100) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 18 Mar 2016 11:59:03 +0000 (12:59 +0100) |
AC_SYS_LARGEFILE defines _FILE_OFFSET_BITS in src/config.h,
so we need this header first before including system headers.
Thanks to @dago for the report.
Fixes:
CC collectd-utils_random.o
In file included from collectd.h:31:0,
from utils_random.c:29:
../../src/config.h:1646:0: error: "_FILE_OFFSET_BITS" redefined
[-Werror]
#define _FILE_OFFSET_BITS 64
^
In file included from
/opt/csw/lib/gcc/i386-pc-solaris2.10/5.2.0/include-fixed/pthread.h:20:0,
from utils_random.c:27:
/opt/csw/lib/gcc/i386-pc-solaris2.10/5.2.0/include-fixed/sys/feature_tests.h:196:0:
note: this is the location of the previous definition
#define _FILE_OFFSET_BITS 32
^
cc1: all warnings being treated as errors
so we need this header first before including system headers.
Thanks to @dago for the report.
Fixes:
CC collectd-utils_random.o
In file included from collectd.h:31:0,
from utils_random.c:29:
../../src/config.h:1646:0: error: "_FILE_OFFSET_BITS" redefined
[-Werror]
#define _FILE_OFFSET_BITS 64
^
In file included from
/opt/csw/lib/gcc/i386-pc-solaris2.10/5.2.0/include-fixed/pthread.h:20:0,
from utils_random.c:27:
/opt/csw/lib/gcc/i386-pc-solaris2.10/5.2.0/include-fixed/sys/feature_tests.h:196:0:
note: this is the location of the previous definition
#define _FILE_OFFSET_BITS 32
^
cc1: all warnings being treated as errors
src/daemon/utils_random.c | patch | blob | history |
index 548d1d81c81aefadda6f9ee790e05650ddbd0104..fee08717a7d464c809be8f23685117654d6bdab0 100644 (file)
* Florian Forster <octo at collectd.org>
**/
-#include <pthread.h>
-
#include "collectd.h"
#include "utils_time.h"
#include "utils_random.h"
+#include <pthread.h>
+
static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
static _Bool have_seed = 0;