On Tue, Sep 6, 2011 at 1:30 AM, Jonas Bonn <[email protected]> wrote:
>
> Signed-off-by: Jonas Bonn <[email protected]>
> ---
>  libc/sysdeps/linux/common/chmod.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/libc/sysdeps/linux/common/chmod.c 
> b/libc/sysdeps/linux/common/chmod.c
> index 871e023..c60456f 100644
> --- a/libc/sysdeps/linux/common/chmod.c
> +++ b/libc/sysdeps/linux/common/chmod.c
> @@ -9,8 +9,16 @@
>
>  #include <sys/syscall.h>
>  #include <sys/stat.h>
> +#include <fcntl.h>
> +#include <unistd.h>
>

those includes could also be put in conditionals if they were not needed before

> +#ifdef __NR_fchmodat
> +int chmod(const char *path, mode_t mode)
> +{
> +       return fchmodat(AT_FDCWD, path, mode, 0);
> +}
>
> +#else
>  #define __NR___syscall_chmod __NR_chmod
>  static __inline__ _syscall2(int, __syscall_chmod, const char *, path, 
> __kernel_mode_t, mode)
>
> @@ -18,4 +26,5 @@ int chmod(const char *path, mode_t mode)
>  {
>        return __syscall_chmod(path, mode);
>  }
> +#endif
>  libc_hidden_def(chmod)
> --
> 1.7.5.4
>
> _______________________________________________
> uClibc mailing list
> [email protected]
> http://lists.busybox.net/mailman/listinfo/uclibc
>
_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc

Reply via email to