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

21 lines
528 B
Diff

Description: Fix Hertz calculation for kfreebsd
Bug-Debian: http://bugs.debian.org/460331
Author: Petr Salinger
--- a/proc/sysinfo.c
+++ b/proc/sysinfo.c
@@ -230,6 +230,14 @@
fputs("2.4+ kernel w/o ELF notes? -- report this\n", stderr);
}
#endif
+#if defined(__FreeBSD_kernel__) || defined(__FreeBSD__)
+ /* On FreeBSD the Hertz hack is unrelaible, there is no ELF note and
+ * Hertz isn't defined in asm/params.h
+ * See Debian Bug #460331
+ */
+ Hertz = 100;
+ return;
+#endif
old_Hertz_hack();
}