summaryrefslogtreecommitdiffstats
path: root/src/collectors/debugfs.plugin/debugfs_plugin.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/collectors/debugfs.plugin/debugfs_plugin.c (renamed from collectors/debugfs.plugin/debugfs_plugin.c)4
1 files changed, 2 insertions, 2 deletions
diff --git a/collectors/debugfs.plugin/debugfs_plugin.c b/src/collectors/debugfs.plugin/debugfs_plugin.c
index 13012ec40..94e3db631 100644
--- a/collectors/debugfs.plugin/debugfs_plugin.c
+++ b/src/collectors/debugfs.plugin/debugfs_plugin.c
@@ -28,7 +28,7 @@ static struct debugfs_module {
{ .name = NULL, .enabled = CONFIG_BOOLEAN_NO, .func = NULL}
};
-#ifdef HAVE_CAPABILITY
+#ifdef HAVE_SYS_CAPABILITY_H
static int debugfs_check_capabilities()
{
cap_t caps = cap_get_proc();
@@ -182,7 +182,7 @@ int main(int argc, char **argv)
// FIXME: remove debugfs_check_sys_permission() after https://github.com/netdata/netdata/issues/15048 is fixed
if (!debugfs_check_capabilities() && !debugfs_am_i_running_as_root() && !debugfs_check_sys_permission()) {
uid_t uid = getuid(), euid = geteuid();
-#ifdef HAVE_CAPABILITY
+#ifdef HAVE_SYS_CAPABILITY_H
netdata_log_error(
"debugfs.plugin should either run as root (now running with uid %u, euid %u) or have special capabilities. "
"Without these, debugfs.plugin cannot access /sys/kernel/debug. "