summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2006-01-23 20:30:22 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2006-01-23 20:30:22 +0000
commit89e73abbfda3de28c4ac6383f123370315bd502a (patch)
tree121abd07781ef0d1b05ac9f9b5e7b198fb2fbfcc /libc/sysdeps/linux/common
parentbfa91a43d6f8a58aa9db375ed0a6209293e9f312 (diff)
Try to correct stat64/stat issue, vapier please check on 64bit arch
Diffstat (limited to 'libc/sysdeps/linux/common')
-rw-r--r--libc/sysdeps/linux/common/getdirname.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libc/sysdeps/linux/common/getdirname.c b/libc/sysdeps/linux/common/getdirname.c
index 3b470db05..43e736120 100644
--- a/libc/sysdeps/linux/common/getdirname.c
+++ b/libc/sysdeps/linux/common/getdirname.c
@@ -26,8 +26,11 @@
libc_hidden_proto(strdup)
libc_hidden_proto(getcwd)
libc_hidden_proto(getenv)
-libc_hidden_proto(stat)
+#ifdef __UCLIBC_HAS_LFS__
libc_hidden_proto(stat64)
+#else
+libc_hidden_proto(stat)
+#endif
/* Return a malloc'd string containing the current directory name.
If the environment variable `PWD' is set, and its value is correct,
@@ -37,7 +40,7 @@ char *
get_current_dir_name (void)
{
char *pwd;
-#if defined __UCLIBC_HAS_LFS__
+#ifdef __UCLIBC_HAS_LFS__
struct stat64 dotstat, pwdstat;
#else
struct stat dotstat, pwdstat;
@@ -45,7 +48,7 @@ get_current_dir_name (void)
pwd = getenv ("PWD");
if (pwd != NULL
-#if defined __UCLIBC_HAS_LFS__
+#ifdef __UCLIBC_HAS_LFS__
&& stat64 (".", &dotstat) == 0
&& stat64 (pwd, &pwdstat) == 0
#else