void-packages/srcpkgs/procps/patches/sysinfo_elfnote.patch

23 lines
844 B
Diff

Description: Find AT_CLKTCK elf note only on Linux
Author: Petr Salinger <Petr.Salinger@seznam.cz>
Bug-Debian: http://bugs.debian.org/378157
Reviewed-by: Craig Small <csmall@debian.org>
Index: b/proc/sysinfo.c
===================================================================
--- a/proc/sysinfo.c 2009-11-24 20:53:04.000000000 +1100
+++ b/proc/sysinfo.c 2009-11-24 21:00:38.000000000 +1100
@@ -221,12 +221,13 @@
// _SC_NPROCESSORS_ONLN returns 1, which should work OK
smp_num_cpus = sysconf(_SC_NPROCESSORS_ONLN);
if(smp_num_cpus<1) smp_num_cpus=1; /* SPARC glibc is buggy */
-
+#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
old_Hertz_hack();
}