return log_internalv(LOG_DEBUG, errno, NULL, 0, NULL, fmt, ap);
}
+#endif
+
int dlopen_bpf(int log_level) {
+#if HAVE_LIBBPF
static void *bpf_dl = NULL;
static int cached = 0;
int r = -ENOENT;
(void) sym_libbpf_set_print(bpf_print_func);
return 1;
+#else
+ return log_once_errno(log_level, SYNTHETIC_ERRNO(EOPNOTSUPP),
+ "libbpf support is not compiled in, cgroup BPF features disabled.");
+#endif
}
+#if HAVE_LIBBPF
int bpf_get_error_translated(const void *ptr) {
int r;
return r;
}
}
-
-#else
-
-int dlopen_bpf(int log_level) {
- return log_once_errno(log_level, SYNTHETIC_ERRNO(EOPNOTSUPP),
- "libbpf support is not compiled in, cgroup BPF features disabled.");
-}
#endif