From aae3d318d4523d26a77f15cc2e7b6e01e9c0c336 Mon Sep 17 00:00:00 2001 From: Craig Small Date: Fri, 7 Oct 2011 10:08:42 +1100 Subject: [PATCH] Elf note AT_CLKTCK is only found on Linux Suppresses a message about elf notes not found on non-Linux systems. kFreeBSD systems, for one, don't have this so the message appears every time you run a procps program otherwise. Based upon Debian patch sysinfo_elfnote by Petr Salinger Bug-Debian: http://bugs.debian.org/378157 --- proc/sysinfo.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/proc/sysinfo.c b/proc/sysinfo.c index 5e224f12..1c7c2798 100644 --- a/proc/sysinfo.c +++ b/proc/sysinfo.c @@ -253,11 +253,13 @@ static void init_libproc(void){ cpuinfo(); +#ifdef __linux__ if(linux_version_code > LINUX_VERSION(2, 4, 0)){ Hertz = find_elf_note(AT_CLKTCK); if(Hertz!=NOTE_NOT_FOUND) return; fputs("2.4+ kernel w/o ELF notes? -- report this\n", stderr); } +#endif /* __linux __ */ old_Hertz_hack(); }