]> git.pld-linux.org Git - packages/linux-libc-headers.git/blob - linux-libc-headers-endian.patch
- no if_addrlabel.h
[packages/linux-libc-headers.git] / linux-libc-headers-endian.patch
1 --- linux-2.6.20/include/linux/aio_abi.h.orig   2007-02-04 19:44:54.000000000 +0100
2 +++ linux-2.6.20/include/linux/aio_abi.h        2007-04-02 21:27:18.150605175 +0200
3 @@ -27,7 +27,11 @@
4  #ifndef __LINUX__AIO_ABI_H
5  #define __LINUX__AIO_ABI_H
6  
7 +#ifdef __KERNEL__
8  #include <asm/byteorder.h>
9 +#else
10 +#include <endian.h>
11 +#endif
12  
13  typedef unsigned long  aio_context_t;
14  
15 @@ -53,6 +57,7 @@
16         __s64           res2;           /* secondary result */
17  };
18  
19 +#ifdef __KERNEL__
20  #if defined(__LITTLE_ENDIAN)
21  #define PADDED(x,y)    x, y
22  #elif defined(__BIG_ENDIAN)
23 @@ -60,6 +65,15 @@
24  #else
25  #error edit for your odd byteorder.
26  #endif
27 +#else /* __KERNEL__ */
28 +#if __BYTE_ORDER == __LITTLE_ENDIAN
29 +#define PADDED(x,y)    x, y
30 +#elif __BYTE_ORDER == __BIG_ENDIAN
31 +#define PADDED(x,y)    y, x
32 +#else
33 +#error edit for your odd byteorder.
34 +#endif
35 +#endif /* __KERNEL__ */
36  
37  /*
38   * we always use a 64bit off_t when communicating
39 --- linux-2.6.20/include/linux/raid/md_p.h.orig 2007-02-04 19:44:54.000000000 +0100
40 +++ linux-2.6.20/include/linux/raid/md_p.h      2007-04-02 21:32:46.657325707 +0200
41 @@ -15,6 +15,10 @@
42  #ifndef _MD_P_H
43  #define _MD_P_H
44  
45 +#ifndef __KERNEL__
46 +#include <endian.h>
47 +#endif
48 +
49  /*
50   * RAID superblock.
51   *
52 @@ -146,7 +150,7 @@
53         __u32 failed_disks;     /*  4 Number of failed disks                  */
54         __u32 spare_disks;      /*  5 Number of spare disks                   */
55         __u32 sb_csum;          /*  6 checksum of the whole superblock        */
56 -#ifdef __BIG_ENDIAN
57 +#if (defined(__KERNEL__) && defined(__BIG_ENDIAN)) || (!defined(__KERNEL__) && (__BYTE_ORDER == __BIG_ENDIAN))
58         __u32 events_hi;        /*  7 high-order of superblock update count   */
59         __u32 events_lo;        /*  8 low-order of superblock update count    */
60         __u32 cp_events_hi;     /*  9 high-order of checkpoint update count   */
This page took 0.036504 seconds and 3 git commands to generate.