check /proc only if using /proc

This commit is contained in:
Hisham Muhammad 2014-11-27 20:04:53 -02:00
parent 5578a316f0
commit a89758094f
1 changed files with 2 additions and 1 deletions

3
htop.c
View File

@ -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);