X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fdaemon%2Fglobals.c;h=85f1b11b0e4d86978bff9b08e9cb6f1a6b1c52e9;hb=bf1c2612bc0405c895f754ebfbb24484122c7cfa;hp=2222a5ce8b9e8f53e69319324219c3a35fa3212d;hpb=69a2285dea4568c0010f116d22415f301b74579a;p=collectd.git diff --git a/src/daemon/globals.c b/src/daemon/globals.c index 2222a5ce..85f1b11b 100644 --- a/src/daemon/globals.c +++ b/src/daemon/globals.c @@ -21,29 +21,34 @@ * DEALINGS IN THE SOFTWARE. **/ -#include "common.h" +// clang-format off +/* + * Explicit order is required or _FILE_OFFSET_BITS will have definition mismatches on Solaris + * See Github Issue #3193 for details + */ +#include "utils/common/common.h" #include "globals.h" +// clang-format on #if HAVE_KSTAT_H #include #endif -void hostname_set(char const *hostname) { - char *h = strdup(hostname); - if (h == NULL) - return; - - free(hostname_g); - hostname_g = h; -} - /* * Global variables */ char *hostname_g; cdtime_t interval_g; -int timeout_g; +int timeout_g; #if HAVE_KSTAT_H kstat_ctl_t *kc; #endif +void hostname_set(char const *hostname) { + char *h = strdup(hostname); + if (h == NULL) + return; + + sfree(hostname_g); + hostname_g = h; +}