f4aa826ede
OBS-URL: https://build.opensuse.org/request/show/51600 OBS-URL: https://build.opensuse.org/package/show/Base:System/procps?expand=0&rev=34
36 lines
1.1 KiB
Plaintext
36 lines
1.1 KiB
Plaintext
Index: b/proc/version.c
|
|
===================================================================
|
|
--- a/proc/version.c
|
|
+++ b/proc/version.c
|
|
@@ -31,12 +31,12 @@ void display_version(void) {
|
|
|
|
#define LINUX_VERSION(x,y,z) (0x10000*(x) + 0x100*(y) + z)
|
|
|
|
int linux_version_code;
|
|
|
|
-static void init_Linux_version(void) __attribute__((constructor));
|
|
-static void init_Linux_version(void) {
|
|
+void init_Linux_version(void) __attribute__((constructor));
|
|
+void init_Linux_version(void) {
|
|
static struct utsname uts;
|
|
int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 3 */
|
|
|
|
if (uname(&uts) == -1) /* failure implies impending death */
|
|
exit(1);
|
|
Index: b/proc/sysinfo.c
|
|
===================================================================
|
|
--- a/proc/sysinfo.c
|
|
+++ b/proc/sysinfo.c
|
|
@@ -258,10 +258,11 @@ long smp_num_cpus(void)
|
|
return(_smp_num_cpus);
|
|
}
|
|
|
|
static void init_libproc(void) __attribute__((constructor));
|
|
static void init_libproc(void){
|
|
+ init_Linux_version();
|
|
have_privs = check_for_privs();
|
|
|
|
if(linux_version_code > LINUX_VERSION(2, 4, 0)){
|
|
Hertz = find_elf_note(AT_CLKTCK);
|
|
if(Hertz!=NOTE_NOT_FOUND) return;
|