about summary refs log tree commit diff
path: root/io
diff options
context:
space:
mode:
Diffstat (limited to 'io')
-rw-r--r--io/fcntl.h2
-rw-r--r--io/sys/stat.h11
2 files changed, 11 insertions, 2 deletions
diff --git a/io/fcntl.h b/io/fcntl.h
index 8e13d33dcc..313540f96f 100644
--- a/io/fcntl.h
+++ b/io/fcntl.h
@@ -114,8 +114,10 @@ extern int __REDIRECT (openat, (int __fd, __const char *__file, int __oflag,
 #  endif
 # endif
 
+# ifdef __USE_LARGEFILE64
 extern int openat64 (int __fd, __const char *__file, int __oflag, ...)
      __nonnull ((2));
+# endif
 #endif
 
 /* Create and open FILE, with mode MODE.  This takes an `int' MODE
diff --git a/io/sys/stat.h b/io/sys/stat.h
index c4b307f2bb..7221b4e7be 100644
--- a/io/sys/stat.h
+++ b/io/sys/stat.h
@@ -236,13 +236,19 @@ extern int fstat64 (int __fd, struct stat64 *__buf) __THROW __nonnull ((2));
 extern int fstatat (int __fd, __const char *__file, struct stat *__buf,
 		    int __flag) __THROW __nonnull ((2, 3));
 # else
+#  ifdef __REDIRECT_NTH
 extern int __REDIRECT_NTH (fstatat, (int __fd, __const char *__file,
 				     struct stat *__buf, int __flag),
 			   fstatat64) __nonnull ((2, 3));
+#  else
+#   define fstatat fstatat64
+#  endif
 # endif
 
+# ifdef __USE_LARGEFILE64
 extern int fstatat64 (int __fd, __const char *__file, struct stat64 *__buf,
 		      int __flag) __THROW __nonnull ((2, 3));
+# endif
 #endif
 
 #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
@@ -446,15 +452,16 @@ __NTH (fstat64 (int __fd, struct stat64 *__statbuf))
 {
   return __fxstat64 (_STAT_VER, __fd, __statbuf);
 }
-# endif
 
-# ifdef __USE_GNU
+#  ifdef __USE_GNU
 extern __inline__ int
 __NTH (fstatat64 (int __fd, __const char *__filename, struct stat64 *__statbuf,
 		  int __flag))
 {
   return __fxstatat64 (_STAT_VER, __fd, __filename, __statbuf, __flag);
 }
+#  endif
+
 # endif
 
 #endif