summaryrefslogtreecommitdiff
path: root/libc/sysdeps
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2002-09-09 19:41:33 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2002-09-09 19:41:33 +0000
commitccc481bbb086c97073b76ae369a16f204c845972 (patch)
treeeb53bcbde74a298cea2d8e3ab759b7a4102c722a /libc/sysdeps
parent4abfcf2bad9ac7b370f4f7b1f441a436718e15b2 (diff)
Fixed compile bugs having to do with 64-bit filesystem operations that
need to be disabled when 'DOLFS' is disabled.
Diffstat (limited to 'libc/sysdeps')
-rw-r--r--libc/sysdeps/linux/common/getdirname.c9
1 files changed, 9 insertions, 0 deletions
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. */