am 55070209: configure: add check for bswap_64
* commit '550702090691af07a3282119ef4f37440c93829e':
configure: add check for bswap_64
diff --git a/configure.ac b/configure.ac
index 7cfd9b4..ae451b8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -72,6 +72,9 @@
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 @@
}
#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.