summaryrefslogtreecommitdiffstats
path: root/patches/procps-3.2.8/20_sysinfo_c.dpatch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/procps-3.2.8/20_sysinfo_c.dpatch')
-rw-r--r--patches/procps-3.2.8/20_sysinfo_c.dpatch25
1 files changed, 25 insertions, 0 deletions
diff --git a/patches/procps-3.2.8/20_sysinfo_c.dpatch b/patches/procps-3.2.8/20_sysinfo_c.dpatch
new file mode 100644
index 000000000..96e176947
--- /dev/null
+++ b/patches/procps-3.2.8/20_sysinfo_c.dpatch
@@ -0,0 +1,25 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 20_sysinfo_c.dpatch by <csmall@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Dont find elf note for non-linux Bug #378157
+
+@DPATCH@
+diff -urNad procps-3.2.7~/proc/sysinfo.c procps-3.2.7/proc/sysinfo.c
+--- procps-3.2.7~/proc/sysinfo.c 2006-06-25 16:41:48.000000000 +1000
++++ procps-3.2.7/proc/sysinfo.c 2007-10-04 22:07:48.000000000 +1000
+@@ -218,12 +218,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();
+ }
+