diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2018-05-23 21:56:11 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2018-05-23 22:18:39 +0200 |
commit | 4f24ccb86c8a9d8b73bbcb2d2d4ba4bfceb5c96b (patch) | |
tree | 710d95ee14b9815b21685d08b1d60ef864d148fe /testing/ocfs2-tools/musl-libocfs2-__bswap_constant_32.patch | |
parent | ada13b6998155f1425ec53c9a6ceeac17a5cb7cd (diff) | |
download | aports-4f24ccb86c8a9d8b73bbcb2d2d4ba4bfceb5c96b.tar.bz2 aports-4f24ccb86c8a9d8b73bbcb2d2d4ba4bfceb5c96b.tar.xz |
testing/ocfs2-tools: rewrite aport and upgrade to 1.8.5
Note: We use the same ("unofficial"?) upstream as Fedora.
Diffstat (limited to 'testing/ocfs2-tools/musl-libocfs2-__bswap_constant_32.patch')
-rw-r--r-- | testing/ocfs2-tools/musl-libocfs2-__bswap_constant_32.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/testing/ocfs2-tools/musl-libocfs2-__bswap_constant_32.patch b/testing/ocfs2-tools/musl-libocfs2-__bswap_constant_32.patch new file mode 100644 index 0000000000..e813db4743 --- /dev/null +++ b/testing/ocfs2-tools/musl-libocfs2-__bswap_constant_32.patch @@ -0,0 +1,29 @@ +From: Jakub Jirutka <jakub@jirutka.cz> +Date: Wed, 23 May 2018 19:56:00 +0200 +Subject: [PATCH] Ensure compatibility with other libcs + +The musl libc does not provide __bswap_constant_32. + +--- a/libocfs2/crc32table.h ++++ b/libocfs2/crc32table.h +@@ -6,11 +6,18 @@ + */ + #include <inttypes.h> + #include <byteswap.h> ++ ++#ifndef __bswap_constant_32 ++#define __bswap_constant_32(x) \ ++ ((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) \ ++ | (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24)) ++#endif ++ + #if __BYTE_ORDER == __LITTLE_ENDIAN + # define tole(x) ((uint32_t)(x)) +-# define tobe(x) ((uint32_t)__bswap_constant_32(x)) ++# define tobe(x) ((uint32_t)__builtin_bswap32(x)) + #elif __BYTE_ORDER == __BIG_ENDIAN +-# define tole(x) ((uint32_t)__bswap_constant_32(x)) ++# define tole(x) ((uint32_t)__builtin_bswap32(x)) + # define tobe(x) ((uint32_t)(x)) + #else + # error Invalid byte order __BYTE_ORDER |