[PATCH v2 35/46] stat: Use fstatat64 if arch does not have the stat syscall

Vineet Gupta Vineet.Gupta1 at synopsys.com
Wed Nov 28 13:01:07 UTC 2012


On Monday 26 November 2012 07:54 PM, Markos Chandras wrote:
> From: Markos Chandras <markos.chandras at imgtec.com>
> 
> Signed-off-by: Markos Chandras <markos.chandras at imgtec.com>
> ---
>  libc/sysdeps/linux/common/stat.c | 17 ++++++++++++++---
>  1 file changed, 14 insertions(+), 3 deletions(-)
> 
> diff --git a/libc/sysdeps/linux/common/stat.c b/libc/sysdeps/linux/common/stat.c
> index 829f35a..038e0c0 100644
> --- a/libc/sysdeps/linux/common/stat.c
> +++ b/libc/sysdeps/linux/common/stat.c
> @@ -8,12 +8,21 @@
>   */
>  
>  #include <sys/syscall.h>
> +#include <fcntl.h>
>  #include <unistd.h>
>  #include <sys/stat.h>
>  #include "xstatconv.h"
>  
>  #undef stat
>  
> +#if defined(__NR_fstat64) && !defined(__NR_stat)

Nit - to be consistent with other changes this needs to be __NR_fstatat64.




More information about the uClibc mailing list