Make sure files in this changeset are formatted properly
[collectd.git] / src / daemon / globals.c
index 2222a5c..85f1b11 100644 (file)
  * 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 <kstat.h>
 #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;
+}