From a89758094fc355771da613a0f9b1cb16017dd4e8 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Thu, 27 Nov 2014 20:04:53 -0200 Subject: [PATCH] check /proc only if using /proc --- htop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htop.c b/htop.c index e70c270d..f5ccbccb 100644 --- a/htop.c +++ b/htop.c @@ -656,11 +656,12 @@ int main(int argc, char** argv) { } } - +#ifdef HAVE_PROC if (access(PROCDIR, R_OK) != 0) { fprintf(stderr, "Error: could not read procfs (compiled to look in %s).\n", PROCDIR); exit(1); } +#endif #ifdef HAVE_LIBNCURSESW char *locale = setlocale(LC_ALL, NULL);