Hello community,

here is the log from the commit of package f2fs-tools for openSUSE:Factory 
checked in at 2014-09-25 08:43:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/f2fs-tools (Old)
 and      /work/SRC/openSUSE:Factory/.f2fs-tools.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "f2fs-tools"

Changes:
--------
--- /work/SRC/openSUSE:Factory/f2fs-tools/f2fs-tools.changes    2014-09-23 
10:43:22.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.f2fs-tools.new/f2fs-tools.changes       
2014-09-25 08:43:11.000000000 +0200
@@ -1,0 +2,6 @@
+Tue Sep 23 09:09:23 UTC 2014 - [email protected]
+
+- Replace 0001-build-provide-definitions-for-byteswapping-on-big-en.patch
+  with official upstream version.
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ 0001-build-provide-definitions-for-byteswapping-on-big-en.patch ++++++
--- /var/tmp/diff_new_pack.CF97YM/_old  2014-09-25 08:43:12.000000000 +0200
+++ /var/tmp/diff_new_pack.CF97YM/_new  2014-09-25 08:43:12.000000000 +0200
@@ -1,52 +1,94 @@
-From 96c932cab4eeeb54a18782fd903f1977779d6921 Mon Sep 17 00:00:00 2001
-From: Jan Engelhardt <[email protected]>
-Date: Tue, 23 Sep 2014 01:04:38 +0200
-Subject: [PATCH] build: provide definitions for byteswapping on big-endian
+From f3a1ea9c7af493b873641fa4263e1b2101fc277b Mon Sep 17 00:00:00 2001
+From: Jaegeuk Kim <[email protected]>
+Date: Mon, 22 Sep 2014 22:22:33 -0700
+Subject: [PATCH] f2fs-tools: fix for build big-endian processors
 
-[   31s] /bin/sh ../libtool  --tag=CC   --mode=link gcc -Wall 
-DWITH_BLKDISCARD -fmessage-length=0 -grecord-gcc-switches -O2 -Wall 
-D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables 
-fasynchronous-unwind-tables -g   -o mkfs.f2fs f2fs_format_main.o f2fs_format.o 
f2fs_format_utils.o -luuid  ../lib/libf2fs.la 
-[   31s] libtool: link: gcc -Wall -DWITH_BLKDISCARD -fmessage-length=0 
-grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector 
-funwind-tables -fasynchronous-unwind-tables -g -o .libs/mkfs.f2fs 
f2fs_format_main.o f2fs_format.o f2fs_format_utils.o  -luuid 
../lib/.libs/libf2fs.so
-[   31s] f2fs_format.o: In function `f2fs_prepare_super_block':
-[   31s] /home/abuild/rpmbuild/BUILD/f2fs-tools/mkfs/f2fs_format.c:108: 
undefined reference to `bswap_32'
-[   31s] /home/abuild/rpmbuild/BUILD/f2fs-tools/mkfs/f2fs_format.c:109: 
undefined reference to `bswap_16'
-[   31s] /home/abuild/rpmbuild/BUILD/f2fs-tools/mkfs/f2fs_format.c:110: 
undefined reference to `bswap_16'
+This patch fixes build failure on big-endian systems.
 
+Reported-and-Tested-by: Jan Engelhardt <[email protected]>
+Signed-off-by: Jaegeuk Kim <[email protected]>
 ---
- include/f2fs_fs.h | 22 ++++++++++++++++++++++
- 1 file changed, 22 insertions(+)
+ include/f2fs_fs.h | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 60 insertions(+)
 
 diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h
-index 6367e05..da1d5c0 100644
+index 6367e05..df37cdf 100644
 --- a/include/f2fs_fs.h
 +++ b/include/f2fs_fs.h
-@@ -34,6 +34,28 @@ typedef unsigned long       pgoff_t;
- #define cpu_to_le32(x)        ((__u32)(x))
- #define cpu_to_le64(x)        ((__u64)(x))
- #elif __BYTE_ORDER == __BIG_ENDIAN
-+static inline uint16_t bswap_16(uint16_t x)
+@@ -5,6 +5,9 @@
+  *             http://www.samsung.com/
+  *
+  * Dual licensed under the GPL or LGPL version 2 licenses.
++ *
++ * The byteswap codes are copied from:
++ *   samba_3_master/lib/ccan/endian/endian.h under LGPL 2.1
+  */
+ #ifndef __F2FS_FS_H__
+ #define __F2FS_FS_H__
+@@ -26,6 +29,63 @@ typedef u32         nid_t;
+ typedef u8            bool;
+ typedef unsigned long pgoff_t;
+ 
++#if HAVE_BYTESWAP_H
++#include <byteswap.h>
++#else
++/**
++ * bswap_16 - reverse bytes in a uint16_t value.
++ * @val: value whose bytes to swap.
++ *
++ * Example:
++ *    // Output contains "1024 is 4 as two bytes reversed"
++ *    printf("1024 is %u as two bytes reversed\n", bswap_16(1024));
++ */
++static inline uint16_t bswap_16(uint16_t val)
 +{
-+      return ((x << 8) & 0xff00) | ((x >> 8) & 0x00ff);
++      return ((val & (uint16_t)0x00ffU) << 8)
++              | ((val & (uint16_t)0xff00U) >> 8);
 +}
-+static inline uint32_t bswap_32(uint32_t x)
++
++/**
++ * bswap_32 - reverse bytes in a uint32_t value.
++ * @val: value whose bytes to swap.
++ *
++ * Example:
++ *    // Output contains "1024 is 262144 as four bytes reversed"
++ *    printf("1024 is %u as four bytes reversed\n", bswap_32(1024));
++ */
++static inline uint32_t bswap_32(uint32_t val)
 +{
-+      return  ((x << 24) & 0xff000000 ) |
-+              ((x <<  8) & 0x00ff0000 ) |
-+              ((x >>  8) & 0x0000ff00 ) |
-+              ((x >> 24) & 0x000000ff );
++      return ((val & (uint32_t)0x000000ffUL) << 24)
++              | ((val & (uint32_t)0x0000ff00UL) <<  8)
++              | ((val & (uint32_t)0x00ff0000UL) >>  8)
++              | ((val & (uint32_t)0xff000000UL) >> 24);
 +}
-+static inline uint64_t bswap_64(uint64_t x)
++#endif /* !HAVE_BYTESWAP_H */
++
++#if !HAVE_BSWAP_64
++/**
++ * bswap_64 - reverse bytes in a uint64_t value.
++ * @val: value whose bytes to swap.
++ *
++ * Example:
++ *    // Output contains "1024 is 1125899906842624 as eight bytes reversed"
++ *    printf("1024 is %llu as eight bytes reversed\n",
++ *            (unsigned long long)bswap_64(1024));
++ */
++static inline uint64_t bswap_64(uint64_t val)
 +{
-+      return  ( (x << 56) & 0xff00000000000000UL ) |
-+              ( (x << 40) & 0x00ff000000000000UL ) |
-+              ( (x << 24) & 0x0000ff0000000000UL ) |
-+              ( (x <<  8) & 0x000000ff00000000UL ) |
-+              ( (x >>  8) & 0x00000000ff000000UL ) |
-+              ( (x >> 24) & 0x0000000000ff0000UL ) |
-+              ( (x >> 40) & 0x000000000000ff00UL ) |
-+              ( (x >> 56) & 0x00000000000000ffUL );
++      return ((val & (uint64_t)0x00000000000000ffULL) << 56)
++              | ((val & (uint64_t)0x000000000000ff00ULL) << 40)
++              | ((val & (uint64_t)0x0000000000ff0000ULL) << 24)
++              | ((val & (uint64_t)0x00000000ff000000ULL) <<  8)
++              | ((val & (uint64_t)0x000000ff00000000ULL) >>  8)
++              | ((val & (uint64_t)0x0000ff0000000000ULL) >> 24)
++              | ((val & (uint64_t)0x00ff000000000000ULL) >> 40)
++              | ((val & (uint64_t)0xff00000000000000ULL) >> 56);
 +}
- #define le16_to_cpu(x)        bswap_16(x)
- #define le32_to_cpu(x)        bswap_32(x)
- #define le64_to_cpu(x)        bswap_64(x)
++#endif
++
+ #if __BYTE_ORDER == __LITTLE_ENDIAN
+ #define le16_to_cpu(x)        ((__u16)(x))
+ #define le32_to_cpu(x)        ((__u32)(x))
 -- 
 2.0.0
 

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to