]> granicus.if.org Git - procps-ng/commitdiff
top: the '#define PRETEND2_5_X' was found to be broken
authorJim Warner <james.warner@comcast.net>
Tue, 14 Aug 2018 05:00:00 +0000 (00:00 -0500)
committerCraig Small <csmall@enc.com.au>
Wed, 12 Sep 2018 11:27:46 +0000 (21:27 +1000)
Our newlib branch has already dropped support for such
old kernels. However, the master branch still supports
them. So this patch will correct a broken #define that
is used to influence the top Summary Area information.

Signed-off-by: Jim Warner <james.warner@comcast.net>
top/top.c
top/top.h

index 46ffdc510232e343c3ca4f222e932c0c3c042ba9..4146ddb75eb8635367b118f4dc6493f503e4ad81 100644 (file)
--- a/top/top.c
+++ b/top/top.c
@@ -3615,7 +3615,11 @@ static void before (char *me) {
    struct sigaction sa;
    proc_t p;
    int i;
+#ifndef PRETEND2_5_X
    int linux_version_code = procps_linux_version();
+#else
+   int linux_version_code = LINUX_VERSION(2,5,43);
+#endif
 
    atexit(close_stdout);
 
index b6e970cd65506fa93959030ad041694cb8c0313d..4a7c49a869a7a1e3d94d3f5d21dcbef0723119e0 100644 (file)
--- a/top/top.h
+++ b/top/top.h
         /* For prompting & helping with top's utf-8 support, thanks to:
               Göran Uddeborg <goeran@uddeborg.se> - September, 2017 */
 
-#ifdef PRETEND2_5_X
-#define linux_version_code LINUX_VERSION(2,5,43)
-#endif
-
    // pretend as if #define _GNU_SOURCE
 char *strcasestr(const char *haystack, const char *needle);