mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-12-25 03:12:08 +01:00
38 lines
982 B
Diff
38 lines
982 B
Diff
diff --git a/src/f2fs/f2fs_fs.h b/src/f2fs/f2fs_fs.h
|
|
index bf11add..8763836 100644
|
|
--- a/src/f2fs/f2fs_fs.h
|
|
+++ b/src/f2fs/f2fs_fs.h
|
|
@@ -147,7 +147,9 @@ struct compress_ctx {
|
|
|
|
#if HAVE_BYTESWAP_H
|
|
#include <byteswap.h>
|
|
-#else
|
|
+#endif
|
|
+
|
|
+#ifndef bswap_16
|
|
/**
|
|
* bswap_16 - reverse bytes in a uint16_t value.
|
|
* @val: value whose bytes to swap.
|
|
@@ -161,7 +163,9 @@ static inline uint16_t bswap_16(uint16_t val)
|
|
return ((val & (uint16_t)0x00ffU) << 8)
|
|
| ((val & (uint16_t)0xff00U) >> 8);
|
|
}
|
|
+#endif
|
|
|
|
+#ifndef bswap_32
|
|
/**
|
|
* bswap_32 - reverse bytes in a uint32_t value.
|
|
* @val: value whose bytes to swap.
|
|
@@ -177,9 +181,9 @@ static inline uint32_t bswap_32(uint32_t val)
|
|
| ((val & (uint32_t)0x00ff0000UL) >> 8)
|
|
| ((val & (uint32_t)0xff000000UL) >> 24);
|
|
}
|
|
-#endif /* !HAVE_BYTESWAP_H */
|
|
+#endif
|
|
|
|
-#if defined HAVE_DECL_BSWAP_64 && !HAVE_DECL_BSWAP_64
|
|
+#ifndef bswap_64
|
|
/**
|
|
* bswap_64 - reverse bytes in a uint64_t value.
|
|
* @val: value whose bytes to swap.
|