From: Michael Tremer Date: Sun, 4 Sep 2011 19:21:44 +0000 (+0000) Subject: sysstat: Build fix because of header update. X-Git-Tag: v2.9-core54~13^2~117 X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff_plain;h=265b164378a3ed56c1d992c2da30684961918ac8 sysstat: Build fix because of header update. --- diff --git a/lfs/sysstat b/lfs/sysstat index 8961355f79..dc15765e85 100644 --- a/lfs/sysstat +++ b/lfs/sysstat @@ -70,6 +70,8 @@ $(subst %,%_MD5,$(objects)) : $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE) + cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/sysstat-6.0.2-sysconf.patch + cd $(DIR_APP) && sed "/asm\/page.h/d" -i common.c cd $(DIR_APP) && cp -vf $(DIR_SRC)/config/sysstat/CONFIG build/ cd $(DIR_APP) && make $(MAKETUNING) cd $(DIR_APP) && make install diff --git a/src/patches/sysstat-6.0.2-sysconf.patch b/src/patches/sysstat-6.0.2-sysconf.patch new file mode 100644 index 0000000000..829cc8fca8 --- /dev/null +++ b/src/patches/sysstat-6.0.2-sysconf.patch @@ -0,0 +1,26 @@ +--- sysstat-6.0.2/common.c.sysc 2005-11-28 11:14:29.000000000 +0100 ++++ sysstat-6.0.2/common.c 2006-05-11 10:40:18.000000000 +0200 +@@ -31,8 +31,9 @@ + #include /* for HZ */ + + /* ++ * PAGE_SIZE should be get by sysconf function - + * For PAGE_SIZE (which may be itself a call to getpagesize()). +- * PAGE_SHIFT no longer necessarily exists in . So ++ * PAGE_SHIFT no longer necessarily exists. So + * we use PAGE_SIZE to compute PAGE_SHIFT... + */ + #include +@@ -408,8 +409,10 @@ + { + int shift = 0; + int size; ++ int p_size; + +- size = PAGE_SIZE >> 10; /* Assume that a page has a minimum size of 1 kB */ ++ p_size = sysconf(_SC_PAGE_SIZE); ++ size = p_size >> 10; /* Assume that a page has a minimum size of 1 kB */ + while (size > 1) { + shift++; + size >>= 1; +