2013-10-29 12:58:18

by Aurelien Jarno

[permalink] [raw]
Subject: [PATCH] UAPI: include <asm/byteorder.h> in linux/raid/md_p.h

linux/raid/md_p.h is using conditionals depending on endianess and fails
with an error if neither of __BIG_ENDIAN, __LITTLE_ENDIAN or
__BYTE_ORDER are defined, but it doesn't include any header which can
define these constants. This make this header unusable alone.

This patch adds a #include <asm/byteorder.h> at the beginning of this
header to make it usable alone. This is needed to compile klibc on MIPS.

Signed-off-by: Aurelien Jarno <[email protected]>
---
include/uapi/linux/raid/md_p.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/include/uapi/linux/raid/md_p.h b/include/uapi/linux/raid/md_p.h
index fe1a540..f7cf7f3 100644
--- a/include/uapi/linux/raid/md_p.h
+++ b/include/uapi/linux/raid/md_p.h
@@ -16,6 +16,7 @@
#define _MD_P_H

#include <linux/types.h>
+#include <asm/byteorder.h>

/*
* RAID superblock.
--
1.8.3.1


2013-10-30 06:13:17

by NeilBrown

[permalink] [raw]
Subject: Re: [PATCH] UAPI: include <asm/byteorder.h> in linux/raid/md_p.h

On Tue, 29 Oct 2013 13:28:58 +0100 Aurelien Jarno <[email protected]>
wrote:

> linux/raid/md_p.h is using conditionals depending on endianess and fails
> with an error if neither of __BIG_ENDIAN, __LITTLE_ENDIAN or
> __BYTE_ORDER are defined, but it doesn't include any header which can
> define these constants. This make this header unusable alone.
>
> This patch adds a #include <asm/byteorder.h> at the beginning of this
> header to make it usable alone. This is needed to compile klibc on MIPS.
>
> Signed-off-by: Aurelien Jarno <[email protected]>
> ---
> include/uapi/linux/raid/md_p.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/include/uapi/linux/raid/md_p.h b/include/uapi/linux/raid/md_p.h
> index fe1a540..f7cf7f3 100644
> --- a/include/uapi/linux/raid/md_p.h
> +++ b/include/uapi/linux/raid/md_p.h
> @@ -16,6 +16,7 @@
> #define _MD_P_H
>
> #include <linux/types.h>
> +#include <asm/byteorder.h>
>
> /*
> * RAID superblock.

Makes sense. Applied. Thanks.

NeilBrown


Attachments:
signature.asc (828.00 B)

2013-10-30 06:20:26

by NeilBrown

[permalink] [raw]
Subject: Re: [PATCH] UAPI: include <asm/byteorder.h> in linux/raid/md_p.h

On Tue, 29 Oct 2013 13:28:58 +0100 Aurelien Jarno <[email protected]>
wrote:

> linux/raid/md_p.h is using conditionals depending on endianess and fails
> with an error if neither of __BIG_ENDIAN, __LITTLE_ENDIAN or
> __BYTE_ORDER are defined, but it doesn't include any header which can
> define these constants. This make this header unusable alone.
>
> This patch adds a #include <asm/byteorder.h> at the beginning of this
> header to make it usable alone. This is needed to compile klibc on MIPS.
>
> Signed-off-by: Aurelien Jarno <[email protected]>
> ---
> include/uapi/linux/raid/md_p.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/include/uapi/linux/raid/md_p.h b/include/uapi/linux/raid/md_p.h
> index fe1a540..f7cf7f3 100644
> --- a/include/uapi/linux/raid/md_p.h
> +++ b/include/uapi/linux/raid/md_p.h
> @@ -16,6 +16,7 @@
> #define _MD_P_H
>
> #include <linux/types.h>
> +#include <asm/byteorder.h>
>
> /*
> * RAID superblock.

Makes sense. Applied. Thanks.

NeilBrown


Attachments:
signature.asc (828.00 B)