- fix build on big endian arches

This commit is contained in:
Dan Horák 2015-01-03 10:41:25 +01:00
parent 2e819146d2
commit e8850214d4
2 changed files with 18 additions and 2 deletions

View File

@ -0,0 +1,11 @@
diff -up f2fs-tools-1.4.0/include/f2fs_fs.h.orig f2fs-tools-1.4.0/include/f2fs_fs.h
--- f2fs-tools-1.4.0/include/f2fs_fs.h.orig 2015-01-03 09:45:23.000000000 +0100
+++ f2fs-tools-1.4.0/include/f2fs_fs.h 2015-01-03 09:45:20.000000000 +0100
@@ -34,6 +34,7 @@ typedef unsigned long pgoff_t;
#define cpu_to_le32(x) ((__u32)(x))
#define cpu_to_le64(x) ((__u64)(x))
#elif __BYTE_ORDER == __BIG_ENDIAN
+#include <byteswap.h>
#define le16_to_cpu(x) bswap_16(x)
#define le32_to_cpu(x) bswap_32(x)
#define le64_to_cpu(x) bswap_64(x)

View File

@ -1,10 +1,11 @@
Name: f2fs-tools
Name: f2fs-tools
Version: 1.4.0
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Tools for Flash-Friendly File System (F2FS)
License: GPLv2+
URL: http://sourceforge.net/projects/f2fs-tools/
Source0: http://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs-tools.git/snapshot/%{name}-%{version}.tar.gz
Patch0: f2fs-tools-1.4.0-bigendian.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: uuid-devel
@ -43,6 +44,7 @@ that use %{name}
%prep
%setup -q
%patch0 -p1 -b .bigendian
sed -i 's/AC_PROG_LIBTOOL/LT_INIT/' configure.ac
%build
@ -77,6 +79,9 @@ rm -f %{buildroot}/%{_libdir}/*.la
%{_libdir}/*.so
%changelog
* Sat Jan 03 2015 Dan Horák <dan[at]danny.cz> - 1.4.0-3
- fix build on big endian arches
* Fri Dec 26 2014 Jonathan Dieter <jdieter@lesbg.com> - 1.4.0-2
- Add missing header to development package