From ccc481bbb086c97073b76ae369a16f204c845972 Mon Sep 17 00:00:00 2001 From: "\"Steven J. Hill\"" Date: Mon, 9 Sep 2002 19:41:33 +0000 Subject: Fixed compile bugs having to do with 64-bit filesystem operations that need to be disabled when 'DOLFS' is disabled. --- libc/misc/statfs/Makefile | 4 ++++ libc/sysdeps/linux/common/getdirname.c | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/libc/misc/statfs/Makefile b/libc/misc/statfs/Makefile index fea23d741..4da855b28 100644 --- a/libc/misc/statfs/Makefile +++ b/libc/misc/statfs/Makefile @@ -22,7 +22,11 @@ TOPDIR=../../../ include $(TOPDIR)Rules.mak +ifeq ($(strip $(__UCLIBC_HAVE_LFS__)),true) CSRC = fstatfs64.c statfs64.c statvfs.c statvfs64.c fstatvfs.c fstatvfs64.c +else +CSRC = statvfs.c fstatvfs.c +endif COBJS=$(patsubst %.c,%.o, $(CSRC)) OBJS=$(COBJS) diff --git a/libc/sysdeps/linux/common/getdirname.c b/libc/sysdeps/linux/common/getdirname.c index a9ce43f30..0d1dd8301 100644 --- a/libc/sysdeps/linux/common/getdirname.c +++ b/libc/sysdeps/linux/common/getdirname.c @@ -30,12 +30,21 @@ char * get_current_dir_name (void) { char *pwd; +#ifdef __USE_LARGEFILE64 struct stat64 dotstat, pwdstat; +#else + struct stat dotstat, pwdstat; +#endif pwd = getenv ("PWD"); if (pwd != NULL +#ifdef __USE_LARGEFILE64 && stat64 (".", &dotstat) == 0 && stat64 (pwd, &pwdstat) == 0 +#else + && stat (".", &dotstat) == 0 + && stat (pwd, &pwdstat) == 0 +#endif && pwdstat.st_dev == dotstat.st_dev && pwdstat.st_ino == dotstat.st_ino) /* The PWD value is correct. Use it. */ -- cgit v1.2.3