# define MADV_DONTFORK INHERIT_NONE
#endif /* __FreeBSD__ || __APPLE__*/
+char *netdata_configured_hostname = NULL;
char *netdata_configured_config_dir = NULL;
char *netdata_configured_log_dir = NULL;
char *netdata_configured_plugins_dir = NULL;
}
void *mymmap(const char *filename, size_t size, int flags, int ksm) {
+#ifndef MADV_MERGEABLE
+ (void)ksm;
+#endif
static int log_madvise_1 = 1;
#ifdef MADV_MERGEABLE
static int log_madvise_2 = 1, log_madvise_3 = 1;
#ifdef __APPLE__
int32_t tmp_processors;
- if (unlikely(GETSYSCTL("hw.logicalcpu", tmp_processors))) {
+ if (unlikely(GETSYSCTL_BY_NAME("hw.logicalcpu", tmp_processors))) {
error("Assuming system has %d processors.", processors);
} else {
processors = tmp_processors;
#elif __FreeBSD__
int32_t tmp_processors;
- if (unlikely(GETSYSCTL("hw.ncpu", tmp_processors))) {
+ if (unlikely(GETSYSCTL_BY_NAME("hw.ncpu", tmp_processors))) {
error("Assuming system has %d processors.", processors);
} else {
processors = tmp_processors;
#elif __FreeBSD__
int32_t tmp_pid_max;
- if (unlikely(GETSYSCTL("kern.pid_max", tmp_pid_max))) {
+ if (unlikely(GETSYSCTL_BY_NAME("kern.pid_max", tmp_pid_max))) {
pid_max = 99999;
error("Assuming system's maximum pid is %d.", pid_max);
} else {