diff options
author | Daniel Lange <DLange@git.local> | 2021-06-10 07:37:09 +0200 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2021-06-10 07:37:09 +0200 |
commit | 423169e635c222e549e3c8d989d3f1f3576c117d (patch) | |
tree | f9e0ef5df116f19752c1304225fc8777b256b442 /debian/patches/0101-drop-o-path-usage.patch | |
parent | 37d8824862a2f6b9375022e1c45ba4548162650f (diff) | |
download | debian_htop-423169e635c222e549e3c8d989d3f1f3576c117d.tar.gz debian_htop-423169e635c222e549e3c8d989d3f1f3576c117d.tar.bz2 debian_htop-423169e635c222e549e3c8d989d3f1f3576c117d.zip |
Some fixes for Bullseye htop 3.0.5-x
Diffstat (limited to 'debian/patches/0101-drop-o-path-usage.patch')
-rw-r--r-- | debian/patches/0101-drop-o-path-usage.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/debian/patches/0101-drop-o-path-usage.patch b/debian/patches/0101-drop-o-path-usage.patch new file mode 100644 index 0000000..969d727 --- /dev/null +++ b/debian/patches/0101-drop-o-path-usage.patch @@ -0,0 +1,38 @@ +From d8e81ab747e96cb687e8d6981ef4a0fb58050884 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@googlemail.com> +Date: Wed, 9 Jun 2021 10:55:22 +0200 +Subject: [PATCH] Linux: drop O_PATH usage + +O_PATH is available since Linux 2.6.39, but we are using fstat(2) on the +returned file descriptor in LinuxProcessList_statProcessDir(), which +is only supported since Linux 3.6. + +Fixes #534 +--- + linux/LinuxProcessList.c | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +--- a/linux/LinuxProcessList.c ++++ b/linux/LinuxProcessList.c +@@ -58,12 +58,6 @@ + #endif + + +-// CentOS 6's kernel doesn't provide a definition of O_PATH +-// based on definition taken from uapi/asm-generic/fcnth.h in Linux kernel tree +-#ifndef O_PATH +-# define O_PATH 010000000 +-#endif +- + static long long btime = -1; + + static long jiffy; +@@ -1313,7 +1307,7 @@ + proc->tgid = parent ? parent->pid : pid; + + #ifdef HAVE_OPENAT +- int procFd = openat(dirFd, entry->d_name, O_PATH | O_DIRECTORY | O_NOFOLLOW); ++ int procFd = openat(dirFd, entry->d_name, O_RDONLY | O_DIRECTORY | O_NOFOLLOW); + if (procFd < 0) + goto errorReadingProcess; + #else |