9cd2dc2bb9f95171042a6b5c3aead9c983539cd2
[openwrt.git] / package / xfsprogs / patches / 110-uclibc_no_ustat.patch
1 --- a/libxfs/linux.c
2 +++ b/libxfs/linux.c
3 @@ -21,7 +21,9 @@
4  #include <mntent.h>
5  #include <sys/stat.h>
6  #undef ustat
7 +#ifndef __UCLIBC__
8  #include <sys/ustat.h>
9 +#endif
10  #include <sys/mount.h>
11  #include <sys/ioctl.h>
12  #include <sys/sysinfo.h>
13 @@ -49,6 +51,7 @@ static int max_block_alignment;
14  int
15  platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose)
16  {
17 +#ifndef __UCLIBC__
18         /* Pad ust; pre-2.6.28 linux copies out too much in 32bit compat mode */
19         struct ustat    ust[2];
20         struct stat64   st;
21 @@ -68,6 +71,7 @@ platform_check_ismounted(char *name, cha
22                                 progname, name);
23                 return 1;
24         }
25 +#endif
26         return 0;
27  }
28