81c8bf16c1
Add appropriate checks in configure.ac. Fixes a slew of autobuilder failures: http://autobuild.buildroot.org/results/cf6/cf6f5b6981694f74bfca45b3d04ff35e4226b162/ http://autobuild.buildroot.org/results/b34/b346472e686af5b517b689217349eab21878bb7b/ http://autobuild.buildroot.org/results/49a/49a6a2a88cac6e0899f271a5e65c78dd9eb2eab4/ ... Note: patches sent upstream, awaiting for reply... Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
51 lines
1.5 KiB
Diff
51 lines
1.5 KiB
Diff
From e436e40b57125472ba732a5d39407ff52f008f52 Mon Sep 17 00:00:00 2001
|
|
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
|
|
Date: Thu, 25 Dec 2014 18:52:00 +0100
|
|
Subject: [PATCH] configure: add check for bswap_64
|
|
|
|
include/f2fs_fs.h checks the HAVE_BSWAP_64 conidtional, but configure
|
|
nevers checks for it.
|
|
|
|
Add a check that the function is indeed declared, and fix the variable
|
|
name to match the naming scheme of autoconf (and not those of WAF like
|
|
is used by samba), and adapt the check as suggested in the autoconf
|
|
manual.
|
|
|
|
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
|
|
Cc: Gustavo Zacarias <gustavo@zacarias.com.ar>
|
|
---
|
|
configure.ac | 3 +++
|
|
include/f2fs_fs.h | 2 +-
|
|
2 files changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index 7cfd9b4..ae451b8 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -72,6 +72,9 @@ AC_CHECK_FUNCS_ONCE([
|
|
memset
|
|
])
|
|
|
|
+AS_IF([test "$ac_cv_header_byteswap_h" = "yes"],
|
|
+ [AC_CHECK_DECLS([bswap_64],,,[#include <byteswap.h>])])
|
|
+
|
|
# Install directories
|
|
AC_PREFIX_DEFAULT([/usr])
|
|
AC_SUBST([sbindir], [/sbin])
|
|
diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h
|
|
index 0c3ba04..4dc2426 100644
|
|
--- a/include/f2fs_fs.h
|
|
+++ b/include/f2fs_fs.h
|
|
@@ -63,7 +63,7 @@ static inline uint32_t bswap_32(uint32_t val)
|
|
}
|
|
#endif /* !HAVE_BYTESWAP_H */
|
|
|
|
-#if !HAVE_BSWAP_64
|
|
+#if defined HAVE_DECL_BSWAP_64 && !HAVE_DECL_BSWAP_64
|
|
/**
|
|
* bswap_64 - reverse bytes in a uint64_t value.
|
|
* @val: value whose bytes to swap.
|
|
--
|
|
1.9.1
|
|
|