summaryrefslogtreecommitdiffstats
path: root/patches/procps-3.2.8/20_sysinfo_c.dpatch
blob: 96e176947cfa8ec36d4f4cdc9f2dd8c4fc6ba31f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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();
 }