linux/types.h: Surround 'struct ustat' with __linux__
authorBin Meng <bmeng.cn@gmail.com>
Sun, 27 Oct 2019 12:19:43 +0000 (05:19 -0700)
committerTom Rini <trini@konsulko.com>
Mon, 28 Oct 2019 17:32:51 +0000 (13:32 -0400)
'struct ustat' uses linux-specific typedefs to declare its memebers:
__kernel_daddr_t and __kernel_ino_t. It is currently not used by any
U-Boot codes, but when we build U-Boot tools for other platform like
Windows, this becomes a problem.

Let's surround it with __linux__.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
include/linux/types.h

index cc6f7cb39ee71b1889117057ade433895396242c..51cb284bb8834510f2ad5d8b53ba19c74fcd1c4a 100644 (file)
@@ -151,12 +151,14 @@ typedef __u32 __bitwise __wsum;
 
 typedef unsigned __bitwise__   gfp_t;
 
 
 typedef unsigned __bitwise__   gfp_t;
 
+#ifdef __linux__
 struct ustat {
        __kernel_daddr_t        f_tfree;
        __kernel_ino_t          f_tinode;
        char                    f_fname[6];
        char                    f_fpack[6];
 };
 struct ustat {
        __kernel_daddr_t        f_tfree;
        __kernel_ino_t          f_tinode;
        char                    f_fname[6];
        char                    f_fpack[6];
 };
+#endif
 
 #define DECLARE_BITMAP(name, bits) \
        unsigned long name[BITS_TO_LONGS(bits)]
 
 #define DECLARE_BITMAP(name, bits) \
        unsigned long name[BITS_TO_LONGS(bits)]