From: Jes Sorensen <Jes.Sorensen@redhat.com>
To: "Maxin B. John" <maxin.john@gmail.com>
Cc: linux-raid@vger.kernel.org, "Maxin B. John" <maxin.john@intel.com>
Subject: Re: [PATCH 2/3][mdadm] mdadm.h: bswap is already defined in uclibc
Date: Mon, 08 Feb 2016 11:00:54 -0500 [thread overview]
Message-ID: <wrfjsi13dweh.fsf@redhat.com> (raw)
In-Reply-To: <1454711298-32524-2-git-send-email-maxin.john@gmail.com> (Maxin B. John's message of "Sat, 6 Feb 2016 00:28:17 +0200")
"Maxin B. John" <maxin.john@gmail.com> writes:
> From: "Maxin B. John" <maxin.john@intel.com>
>
> Fixes this build error:
>
> | In file included from mdadm.c:28:0:
> | mdadm.h:142:0: error: "bswap_16" redefined [-Werror]
> | #define bswap_16(x) (((x) & 0x00ffU) << 8 | \
> | ^
>
> Signed-off-by: Maxin B. John <maxin.john@intel.com>
> ---
> mdadm.h | 9 +++++++++
> 1 file changed, 9 insertions(+)
Hi Maxin,
I am not opposed to this, but I would like to understand why you see
these duplicate defines. What defines it in your build environment?
Cheers,
Jes
>
> diff --git a/mdadm.h b/mdadm.h
> index dd02be7..230e60f 100755
> --- a/mdadm.h
> +++ b/mdadm.h
> @@ -139,12 +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> */
> +
> +#ifndef bswap_16
> #define bswap_16(x) (((x) & 0x00ffU) << 8 | \
> ((x) & 0xff00U) >> 8)
> +#endif
> +
> +#ifndef bswap_32
> #define bswap_32(x) (((x) & 0x000000ffU) << 24 | \
> ((x) & 0xff000000U) >> 24 | \
> ((x) & 0x0000ff00U) << 8 | \
> ((x) & 0x00ff0000U) >> 8)
> +#endif
> +
> +#ifndef bswap_64
> #define bswap_64(x) (((x) & 0x00000000000000ffULL) << 56 | \
> ((x) & 0xff00000000000000ULL) >> 56 | \
> ((x) & 0x000000000000ff00ULL) << 40 | \
> @@ -153,6 +161,7 @@ struct dlm_lksb {
> ((x) & 0x0000ff0000000000ULL) >> 24 | \
> ((x) & 0x00000000ff000000ULL) << 8 | \
> ((x) & 0x000000ff00000000ULL) >> 8)
> +#endif
>
> #if !defined(__KLIBC__)
> #if BYTE_ORDER == LITTLE_ENDIAN
next prev parent reply other threads:[~2016-02-08 16:00 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-05 22:28 [PATCH 1/3][mdadm] util.c: include poll.h instead of sys/poll.h Maxin B. John
2016-02-05 22:28 ` [PATCH 2/3][mdadm] mdadm.h: bswap is already defined in uclibc Maxin B. John
2016-02-08 16:00 ` Jes Sorensen [this message]
2016-02-08 16:10 ` Maxin B. John
2016-02-10 19:20 ` Jes Sorensen
2016-02-11 11:26 ` Maxin B. John
2016-02-05 22:28 ` [PATCH 3/3][mdadm] Monitor.c: fix compiler error with x32 toolchain Maxin B. John
2016-02-06 1:17 ` Xiao Ni
2016-02-06 5:27 ` Maxin B. John
2016-02-08 15:59 ` [PATCH 1/3][mdadm] util.c: include poll.h instead of sys/poll.h Jes Sorensen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=wrfjsi13dweh.fsf@redhat.com \
--to=jes.sorensen@redhat.com \
--cc=linux-raid@vger.kernel.org \
--cc=maxin.john@gmail.com \
--cc=maxin.john@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.