From 69ec861c9d758175337079cd0ed70946be07e522 Mon Sep 17 00:00:00 2001 From: Kedar Sovani Date: Fri, 10 Jul 2009 10:30:47 +0200 Subject: [PATCH] Fix build failure on ARM. Signed-off-by: Kedar Sovani Signed-off-by: Vinit Dhatrak --- scsi-target-utils.spec | 7 ++++++- tgt-20090807-file-range-arm.patch | 12 ++++++++++++ 2 files changed, 18 insertions(+), 1 deletions(-) create mode 100644 tgt-20090807-file-range-arm.patch diff --git a/scsi-target-utils.spec b/scsi-target-utils.spec index df0503a..9da14ee 100644 --- a/scsi-target-utils.spec +++ b/scsi-target-utils.spec @@ -1,6 +1,6 @@ Name: scsi-target-utils Version: 0.9.5 -Release: 1%{?dist} +Release: 1%{?dist}.fa1 Summary: The SCSI target daemon and utility programs Group: System Environment/Daemons @@ -10,6 +10,7 @@ Source0: http://stgt.berlios.de/releases/tgt-%{version}.tar.bz2 Source1: tgtd.init Patch0: tgt-20080805-shebang.patch Patch1: tgt-0.9.5-makefile.patch +Patch2: tgt-20090807-file-range-arm.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: openssl-devel pkgconfig @@ -23,6 +24,7 @@ Currently, software iSCSI targets are supported. %setup -q -n tgt-%{version} %patch0 -p1 %patch1 -p1 +%patch2 -p1 %{__chmod} 0644 scripts/tgt-core-test %build @@ -81,6 +83,9 @@ fi %{_initrddir}/tgtd %changelog +* Mon Jul 06 2009 Vinit Dhatrak - 0.9.5-1.fa1 +- Add patch for sync_file_range on arm arch. + * Mon Mar 16 2009 Terje Rosten - 0.9.5-1 - 0.9.5 - remove patch now upstream diff --git a/tgt-20090807-file-range-arm.patch b/tgt-20090807-file-range-arm.patch new file mode 100644 index 0000000..3785120 --- /dev/null +++ b/tgt-20090807-file-range-arm.patch @@ -0,0 +1,12 @@ +diff -urp tgt-0.9.5.orig/usr/util.h tgt-0.9.5/usr/util.h +--- tgt-0.9.5.orig/usr/util.h 2009-03-11 14:39:42.000000000 -0400 ++++ tgt-0.9.5/usr/util.h 2009-07-10 04:21:35.000000000 -0400 +@@ -108,6 +108,8 @@ extern unsigned long pagesize, pageshift + #define __NR_sync_file_range 1300 + #elif defined(__powerpc64__) || defined(__PPC__) + #define __NR_sync_file_range 308 ++#elif defined(__arm__) ++#define __NR_sync_file_range __NR_sync_file_range2 + #endif + #endif + -- 1.5.5.6