Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:Update
mdadm.5365
0163-mdadm.h-rename-bswap-macros-to-avoid-clash...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0163-mdadm.h-rename-bswap-macros-to-avoid-clash-with-uCli.patch of Package mdadm.5365
From dd47b4e0c45fd72b94a9a7d0f0a5046ef9c8d97b Mon Sep 17 00:00:00 2001 From: Jes Sorensen <Jes.Sorensen@redhat.com> Date: Wed, 10 Feb 2016 14:15:38 -0500 Subject: [PATCH 225/359] mdadm.h: rename bswap macros to avoid clash with uClibc definitions References: bsc#1081910 uClibc exposes it's own version of bswap_<X> macros. Rather than pulling in random macros by change, rename the mdadm ones to make sure we know what we are getting. Reported-by: "Maxin B. John" <maxin.john@gmail.com> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Coly Li <colyli@suse.de> --- mdadm.h | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/mdadm.h b/mdadm.h index dd02be7..72888e2 100755 --- a/mdadm.h +++ b/mdadm.h @@ -139,20 +139,20 @@ struct dlm_lksb { * and there is no standard conversion function so... */ /* And dietlibc doesn't think byteswap is ok, so.. */ /* #include <byteswap.h> */ -#define bswap_16(x) (((x) & 0x00ffU) << 8 | \ - ((x) & 0xff00U) >> 8) -#define bswap_32(x) (((x) & 0x000000ffU) << 24 | \ - ((x) & 0xff000000U) >> 24 | \ - ((x) & 0x0000ff00U) << 8 | \ - ((x) & 0x00ff0000U) >> 8) -#define bswap_64(x) (((x) & 0x00000000000000ffULL) << 56 | \ - ((x) & 0xff00000000000000ULL) >> 56 | \ - ((x) & 0x000000000000ff00ULL) << 40 | \ - ((x) & 0x00ff000000000000ULL) >> 40 | \ - ((x) & 0x0000000000ff0000ULL) << 24 | \ - ((x) & 0x0000ff0000000000ULL) >> 24 | \ - ((x) & 0x00000000ff000000ULL) << 8 | \ - ((x) & 0x000000ff00000000ULL) >> 8) +#define __mdadm_bswap_16(x) (((x) & 0x00ffU) << 8 | \ + ((x) & 0xff00U) >> 8) +#define __mdadm_bswap_32(x) (((x) & 0x000000ffU) << 24 | \ + ((x) & 0xff000000U) >> 24 | \ + ((x) & 0x0000ff00U) << 8 | \ + ((x) & 0x00ff0000U) >> 8) +#define __mdadm_bswap_64(x) (((x) & 0x00000000000000ffULL) << 56 | \ + ((x) & 0xff00000000000000ULL) >> 56 | \ + ((x) & 0x000000000000ff00ULL) << 40 | \ + ((x) & 0x00ff000000000000ULL) >> 40 | \ + ((x) & 0x0000000000ff0000ULL) << 24 | \ + ((x) & 0x0000ff0000000000ULL) >> 24 | \ + ((x) & 0x00000000ff000000ULL) << 8 | \ + ((x) & 0x000000ff00000000ULL) >> 8) #if !defined(__KLIBC__) #if BYTE_ORDER == LITTLE_ENDIAN @@ -163,19 +163,19 @@ struct dlm_lksb { #define __le32_to_cpu(_x) (unsigned int)(_x) #define __le64_to_cpu(_x) (unsigned long long)(_x) -#define __cpu_to_be16(_x) bswap_16(_x) -#define __cpu_to_be32(_x) bswap_32(_x) -#define __cpu_to_be64(_x) bswap_64(_x) -#define __be16_to_cpu(_x) bswap_16(_x) -#define __be32_to_cpu(_x) bswap_32(_x) -#define __be64_to_cpu(_x) bswap_64(_x) +#define __cpu_to_be16(_x) __mdadm_bswap_16(_x) +#define __cpu_to_be32(_x) __mdadm_bswap_32(_x) +#define __cpu_to_be64(_x) __mdadm_bswap_64(_x) +#define __be16_to_cpu(_x) __mdadm_bswap_16(_x) +#define __be32_to_cpu(_x) __mdadm_bswap_32(_x) +#define __be64_to_cpu(_x) __mdadm_bswap_64(_x) #elif BYTE_ORDER == BIG_ENDIAN -#define __cpu_to_le16(_x) bswap_16(_x) -#define __cpu_to_le32(_x) bswap_32(_x) -#define __cpu_to_le64(_x) bswap_64(_x) -#define __le16_to_cpu(_x) bswap_16(_x) -#define __le32_to_cpu(_x) bswap_32(_x) -#define __le64_to_cpu(_x) bswap_64(_x) +#define __cpu_to_le16(_x) __mdadm_bswap_16(_x) +#define __cpu_to_le32(_x) __mdadm_bswap_32(_x) +#define __cpu_to_le64(_x) __mdadm_bswap_64(_x) +#define __le16_to_cpu(_x) __mdadm_bswap_16(_x) +#define __le32_to_cpu(_x) __mdadm_bswap_32(_x) +#define __le64_to_cpu(_x) __mdadm_bswap_64(_x) #define __cpu_to_be16(_x) (unsigned int)(_x) #define __cpu_to_be32(_x) (unsigned int)(_x) -- 2.16.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor