Skip to contentSkip to conversation

UAPI: include <asm/byteorder.h> in linux/raid/md_p.h

PATCH In review Aurelien Jarno 2 participants 3 messages Oct 29, 2013 – Oct 30, 2013 MD RAID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 include/uapi/linux/raid/md_p.h | 1 +
 1 file changed, 1 insertion(+)
include/uapi/linux/raid/md_p.h +1 -0
index fe1a540..f7cf7f3 100644
@@ -16,6 +16,7 @@
 #define _MD_P_H
 
 #include <linux/types.h>
+#include <asm/byteorder.h>
 
 /*
  * RAID superblock.
Signature · 1 line
1.8.3.1
#1 lore raw
Quoted 18 lines · 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.

---
 include/uapi/linux/raid/md_p.h | 1 +
 1 file changed, 1 insertion(+)
include/uapi/linux/raid/md_p.h +0 -0
index fe1a540..f7cf7f3 100644

include/uapi/linux/raid/md_p.h line 22

Quoted 7 lines
include/uapi/linux/raid/md_p.h +1 -0
@@ -16,6 +16,7 @@
 #define _MD_P_H
 
 #include <linux/types.h>
+#include <asm/byteorder.h>
 
 /*
  * RAID superblock.

Makes sense. Applied. Thanks.

NeilBrown

#2 lore raw
In reply to Aurelien Jarno
Quoted 18 lines · 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.

---
 include/uapi/linux/raid/md_p.h | 1 +
 1 file changed, 1 insertion(+)
include/uapi/linux/raid/md_p.h +0 -0
index fe1a540..f7cf7f3 100644

include/uapi/linux/raid/md_p.h line 22

Quoted 7 lines
include/uapi/linux/raid/md_p.h +1 -0
@@ -16,6 +16,7 @@
 #define _MD_P_H
 
 #include <linux/types.h>
+#include <asm/byteorder.h>
 
 /*
  * RAID superblock.

Makes sense. Applied. Thanks.

NeilBrown