[filebench] fix build on secondary arches

Dan Horák sharkcz at fedoraproject.org
Fri Oct 7 11:17:54 UTC 2011


commit 801ef67a4814b0bccadd2f1527e261f2e98e6b0e
Author: Dan Horák <dan at danny.cz>
Date:   Fri Oct 7 13:17:51 2011 +0200

    fix build on secondary arches

 filebench-1.4.9-ppc64_build_macro.patch |   12 ------------
 filebench-1.4.9-secondary.patch         |   22 ++++++++++++++++++++++
 filebench.spec                          |   10 +++++++---
 3 files changed, 29 insertions(+), 15 deletions(-)
---
diff --git a/filebench-1.4.9-secondary.patch b/filebench-1.4.9-secondary.patch
new file mode 100644
index 0000000..9ead71a
--- /dev/null
+++ b/filebench-1.4.9-secondary.patch
@@ -0,0 +1,22 @@
+diff -up filebench-1.4.9/ioprio.c.secondary filebench-1.4.9/ioprio.c
+--- filebench-1.4.9/ioprio.c.secondary	2011-06-08 20:58:04.000000000 +0200
++++ filebench-1.4.9/ioprio.c	2011-10-07 12:38:24.000000000 +0200
+@@ -4,7 +4,7 @@
+ #if defined(__i386__)
+ #define __NR_ioprio_set		289
+ #define __NR_ioprio_get		290
+-#elif defined(__ppc__)
++#elif defined(__powerpc__) || defined(__powerpc64__)
+ #define __NR_ioprio_set		273
+ #define __NR_ioprio_get		274
+ #elif defined(__x86_64__)
+@@ -13,6 +13,9 @@
+ #elif defined(__ia64__)
+ #define __NR_ioprio_set		1274
+ #define __NR_ioprio_get		1275
++#elif defined(__s390__) || defined(__s390x__)
++#define __NR_ioprio_set		282
++#define __NR_ioprio_get		283
+ #else
+ #error "Unsupported arch"
+ #endif
diff --git a/filebench.spec b/filebench.spec
index 2389327..d0386dd 100644
--- a/filebench.spec
+++ b/filebench.spec
@@ -1,6 +1,6 @@
 Name:           filebench
 Version:        1.4.9
-Release:        6%{?dist}
+Release:        7%{?dist}
 Summary:        A model based file system workload generator
 
 Group:          Applications/File
@@ -9,7 +9,8 @@ URL:            http://filebench.sourceforge.net/
 Source0:        http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
 Source1:        LICENSE
 Source2:        filebench.1
-Patch0:         filebench-1.4.9-ppc64_build_macro.patch
+# fix build on secondary arches
+Patch0:         filebench-1.4.9-secondary.patch
 Patch1:         make-dofile-global.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -24,7 +25,7 @@ for detailed workload specification.
 
 %prep
 %setup -q
-%patch0 -p1
+%patch0 -p1 -b .secondary
 %patch1 -p1
 cp -p %{SOURCE1} .
 cp -p %{SOURCE2} .
@@ -54,6 +55,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Fri Oct 7 2011 Dan Horák <dan[at]danny.cz> 1.4.9-7
+- fix build on secondary arches
+
 * Fri Sep 9 2011 Hushan Jia <hushan.jia at gmail.com> 1.4.9-6
 - make dofile global
 - add bison to BR


More information about the scm-commits mailing list