procps: fix unknown HZ value.

This commit is contained in:
Arne Fitzenreiter
2011-10-02 13:15:17 +02:00
parent f8031af5f9
commit 9b8287772a
2 changed files with 36 additions and 0 deletions

View File

@@ -70,6 +70,7 @@ $(subst %,%_MD5,$(objects)) :
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-fix_unknown_HZ_value.patch
cd $(DIR_APP) && make $(MAKETUNING)
cd $(DIR_APP) && make install
install -m 0644 $(DIR_SRC)/config/etc/sysctl.conf /etc

View File

@@ -0,0 +1,35 @@
diff -Naur procps-3.2.6.org/proc/sysinfo.c procps-3.2.6/proc/sysinfo.c
--- procps-3.2.6.org/proc/sysinfo.c 2005-03-14 05:31:27.000000000 +0100
+++ procps-3.2.6/proc/sysinfo.c 2011-10-02 12:51:32.000000000 +0200
@@ -209,6 +209,7 @@
static void init_libproc(void) __attribute__((constructor));
static void init_libproc(void){
have_privs = check_for_privs();
+ init_Linux_version();
// ought to count CPUs in /proc/stat instead of relying
// on glibc, which foolishly tries to parse /proc/cpuinfo
//
diff -Naur procps-3.2.6.org/proc/version.c procps-3.2.6/proc/version.c
--- procps-3.2.6.org/proc/version.c 2003-01-29 02:11:43.000000000 +0100
+++ procps-3.2.6/proc/version.c 2011-10-02 12:52:36.000000000 +0200
@@ -33,8 +33,7 @@
int linux_version_code;
-static void init_Linux_version(void) __attribute__((constructor));
-static void init_Linux_version(void) {
+void init_Linux_version(void) {
static struct utsname uts;
int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 3 */
diff -Naur procps-3.2.6.org/proc/version.h procps-3.2.6/proc/version.h
--- procps-3.2.6.org/proc/version.h 2002-12-15 01:08:32.000000000 +0100
+++ procps-3.2.6/proc/version.h 2011-10-02 12:53:10.000000000 +0200
@@ -14,6 +14,7 @@
EXTERN_C_BEGIN
+extern void init_Linux_version(void);
extern void display_version(void); /* display suite version */
extern const char procps_version[]; /* global buf for suite version */