From: Jim Warner Date: Tue, 14 Aug 2018 05:00:00 +0000 (-0500) Subject: top: the '#define PRETEND2_5_X' was found to be broken X-Git-Tag: v3.3.16~34 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2b82cbfc2aa25d613414d9b164ae5773ca31045f;p=procps-ng top: the '#define PRETEND2_5_X' was found to be broken 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 --- diff --git a/top/top.c b/top/top.c index 46ffdc51..4146ddb7 100644 --- 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); diff --git a/top/top.h b/top/top.h index b6e970cd..4a7c49a8 100644 --- a/top/top.h +++ b/top/top.h @@ -92,10 +92,6 @@ /* For prompting & helping with top's utf-8 support, thanks to: Göran Uddeborg - 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);