retitle 378157 procps(GNU/kFreeBSD) weird message due to unavailable AT_CLKTCK 
ELF note
tags 378157 +patch

Hi,

ELF notes are supplied by kernel, AT_CLKTCK note become available
for linux kernel during 2.4.0 prerelease series.

Under FreeBSD kernel, this note is not supplied at all.
Please, could guard usage of AT_CLKTCK as shown bellow.

Thanks

        Petr


--- proc/sysinfo.c~     2007-02-26 13:32:21.000000000 +0100
+++ proc/sysinfo.c      2007-02-26 13:32:21.000000000 +0100
@@ -219,11 +219,13 @@
   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();
 }



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to