diff options
author | Daniel Lange <DLange@git.local> | 2021-10-15 09:03:04 +0200 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2021-10-15 09:03:04 +0200 |
commit | 30ce3b4c264c51c98f280e88e23792ff7deb2317 (patch) | |
tree | f9730c54ab9d86ce57ce636f2fba1fdc03f46072 /linux/LinuxProcessList.c | |
parent | 69f439eff387a6ecb52734e400b297a3c85f2285 (diff) | |
download | debian_htop-30ce3b4c264c51c98f280e88e23792ff7deb2317.tar.gz debian_htop-30ce3b4c264c51c98f280e88e23792ff7deb2317.tar.bz2 debian_htop-30ce3b4c264c51c98f280e88e23792ff7deb2317.zip |
New upstream version 3.1.1upstream/3.1.1
Diffstat (limited to 'linux/LinuxProcessList.c')
-rw-r--r-- | linux/LinuxProcessList.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c index 8d82b00..dbbc57d 100644 --- a/linux/LinuxProcessList.c +++ b/linux/LinuxProcessList.c @@ -1,7 +1,7 @@ /* htop - LinuxProcessList.c (C) 2014 Hisham H. Muhammad -Released under the GNU GPLv2, see the COPYING file +Released under the GNU GPLv2+, see the COPYING file in the source distribution for its full text. */ @@ -58,6 +58,10 @@ in the source distribution for its full text. #include "LibSensors.h" #endif +#ifndef O_PATH +#define O_PATH 010000000 // declare for ancient glibc versions +#endif + static long long btime = -1; @@ -1236,8 +1240,8 @@ static bool LinuxProcessList_readCmdlineFile(Process* process, openat_arg_t proc if (amtRead > 0) { filename[amtRead] = 0; if (!process->procExe || - (!process->procExeDeleted && !String_eq(filename, process->procExe)) || - (process->procExeDeleted && !String_startsWith(filename, process->procExe))) { + (!process->procExeDeleted && !String_eq(filename, process->procExe)) || + process->procExeDeleted) { const char* deletedMarker = " (deleted)"; const size_t markerLen = strlen(deletedMarker); @@ -1605,7 +1609,7 @@ static inline void LinuxProcessList_scanMemoryInfo(ProcessList* this) { (variable) = parsed_; \ } \ break; \ - } + } else (void) 0 /* Require a ";" after the macro use. */ switch (buffer[0]) { case 'M': @@ -1781,12 +1785,12 @@ static inline void LinuxProcessList_scanZfsArcstats(LinuxProcessList* lpl) { if (String_startsWith(buffer, label)) { \ sscanf(buffer + strlen(label), " %*2u %32llu", variable); \ break; \ - } + } else (void) 0 /* Require a ";" after the macro use. */ #define tryReadFlag(label, variable, flag) \ if (String_startsWith(buffer, label)) { \ (flag) = sscanf(buffer + strlen(label), " %*2u %32llu", variable); \ break; \ - } + } else (void) 0 /* Require a ";" after the macro use. */ switch (buffer[0]) { case 'c': |