diff options
Diffstat (limited to 'libc/sysdeps/linux/common/stat.c')
| -rw-r--r-- | libc/sysdeps/linux/common/stat.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/libc/sysdeps/linux/common/stat.c b/libc/sysdeps/linux/common/stat.c index 7e7fe6bec..662ed665a 100644 --- a/libc/sysdeps/linux/common/stat.c +++ b/libc/sysdeps/linux/common/stat.c @@ -2,24 +2,30 @@ /* * stat() for uClibc * - * Copyright (C) 2000-2004 by Erik Andersen <andersen@codepoet.org> + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org> * - * GNU Library General Public License (LGPL) version 2 or later. + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ +/* need to hide the 64bit prototype or the strong_alias() + * will fail when __NR_stat64 doesnt exist */ +#define stat64 __hidestat64 + #include "syscalls.h" #include <unistd.h> -#define _SYS_STAT_H -#include <bits/stat.h> +#include <sys/stat.h> #include "xstatconv.h" +#undef stat64 + +libc_hidden_proto(stat) + #define __NR___syscall_stat __NR_stat -#undef __stat #undef stat static inline _syscall2(int, __syscall_stat, const char *, file_name, struct kernel_stat *, buf); -int attribute_hidden __stat(const char *file_name, struct stat *buf) +int stat(const char *file_name, struct stat *buf) { int result; struct kernel_stat kbuf; @@ -30,9 +36,11 @@ int attribute_hidden __stat(const char *file_name, struct stat *buf) } return result; } -strong_alias(__stat,stat) +libc_hidden_def(stat) #if ! defined __NR_stat64 && defined __UCLIBC_HAS_LFS__ -hidden_strong_alias(__stat,__stat64) -weak_alias(__stat,stat64) +extern __typeof(stat) stat64; +libc_hidden_proto(stat64) +strong_alias(stat,stat64) +libc_hidden_def(stat64) #endif |
