Browse Source

statx: make include conditional, fixes non-csky arch buildroot builds

Waldemar Brodkorb 4 years ago
parent
commit
cb6a910ab8
2 changed files with 6 additions and 0 deletions
  1. 2 0
      include/sys/stat.h
  2. 4 0
      libc/sysdeps/linux/common/statx_cp.c

+ 2 - 0
include/sys/stat.h

@@ -393,9 +393,11 @@ extern int futimens (int __fd, const struct timespec __times[2]) __THROW;
 #undef _MKNOD_VER
 #define _MKNOD_VER 0
 
+#ifdef __UCLIBC_HAVE_STATX__
 #ifdef __USE_GNU
 # include <bits/statx.h>
 #endif
+#endif
 
 
 __END_DECLS

+ 4 - 0
libc/sysdeps/linux/common/statx_cp.c

@@ -15,10 +15,13 @@
    License along with the GNU C Library.  If not, see
    <http://www.gnu.org/licenses/>.  */
 
+#include <bits/uClibc_arch_features.h>
 #include <stddef.h>
 #include <string.h>
 #include <sys/stat.h>
 
+#if defined __UCLIBC_HAVE_STATX__
+
 #include <statx_cp.h>
 
 #if !defined(__NR_fstat64) || !defined(__NR_fstatat64)
@@ -70,3 +73,4 @@ __cp_stat_statx (struct stat *to, struct statx *from)
   to->st_blksize = from->stx_blksize;
 }
 #endif
+#endif