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
This commit is contained in:
Craig Small 2011-10-07 10:08:42 +11:00
parent b9a408372e
commit aae3d318d4

View File

@ -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();
}