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:
parent
b9a408372e
commit
aae3d318d4
@ -253,11 +253,13 @@ static void init_libproc(void){
|
|||||||
|
|
||||||
cpuinfo();
|
cpuinfo();
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
if(linux_version_code > LINUX_VERSION(2, 4, 0)){
|
if(linux_version_code > LINUX_VERSION(2, 4, 0)){
|
||||||
Hertz = find_elf_note(AT_CLKTCK);
|
Hertz = find_elf_note(AT_CLKTCK);
|
||||||
if(Hertz!=NOTE_NOT_FOUND) return;
|
if(Hertz!=NOTE_NOT_FOUND) return;
|
||||||
fputs("2.4+ kernel w/o ELF notes? -- report this\n", stderr);
|
fputs("2.4+ kernel w/o ELF notes? -- report this\n", stderr);
|
||||||
}
|
}
|
||||||
|
#endif /* __linux __ */
|
||||||
old_Hertz_hack();
|
old_Hertz_hack();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user