소스 검색

fix (hopefully) statvfs breakage on x86_64 that resulted from fixing i386...

Rich Felker 14 년 전
부모
커밋
fc0cf2852d
2개의 변경된 파일10개의 추가작업 그리고 2개의 파일을 삭제
  1. 5 1
      src/stat/fstatvfs.c
  2. 5 1
      src/stat/statvfs.c

+ 5 - 1
src/stat/fstatvfs.c

@@ -4,7 +4,11 @@
 
 int fstatvfs(int fd, struct statvfs *buf)
 {
-	return syscall(SYS_fstatfs, fd, sizeof *buf, buf);
+#ifdef SYS_fstatfs64
+	return syscall(SYS_fstatfs64, fd, sizeof *buf, buf);
+#else
+	return syscall(SYS_fstatfs, fd, buf);
+#endif
 }
 
 weak_alias(fstatvfs, fstatfs);

+ 5 - 1
src/stat/statvfs.c

@@ -4,7 +4,11 @@
 
 int statvfs(const char *path, struct statvfs *buf)
 {
-	return syscall(SYS_statfs, path, sizeof *buf, buf);
+#ifdef SYS_statfs64
+	return syscall(SYS_statfs64, path, sizeof *buf, buf);
+#else
+	return syscall(SYS_statfs, path, buf);
+#endif
 }
 
 weak_alias(statvfs, statfs);