From 2ab130624688b8fc68fad65ece6df6ec8e923947 Mon Sep 17 00:00:00 2001 From: rain1 Date: Thu, 14 Apr 2016 12:31:13 +0000 Subject: [PATCH] * src/nethogs.h: Including files for PATH_MAX and readlink. * src/nethogs.cpp: Bug fix - make capability detection work correctly when invoking a program in PATH rather than only when invoked explicitly like ./src/nethogs. --- src/nethogs.cpp | 2 ++ src/nethogs.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/nethogs.cpp b/src/nethogs.cpp index 855261c..d08c4e7 100644 --- a/src/nethogs.cpp +++ b/src/nethogs.cpp @@ -39,6 +39,8 @@ #include #if NEEDROOT == 0 +#include +#include #include #include #include diff --git a/src/nethogs.h b/src/nethogs.h index 08f1add..bae80f0 100644 --- a/src/nethogs.h +++ b/src/nethogs.h @@ -53,7 +53,7 @@ * like www.adamantix.org: in that case nethogs shouldn't check if it's * running as root. Take care to give it sufficient privileges though. */ #ifndef NEEDROOT -#define NEEDROOT 1 +#define NEEDROOT 0 #endif #define DEBUG 0