Mercurial > hg > toybox
changeset 1673:6b494fdd61e0 draft
Alright, the Android guys agree with the musl guys: faccessat(AT_SYMLINK_NOFOLLOW) is not supported.
author | Rob Landley <rob@landley.net> |
---|---|
date | Fri, 06 Feb 2015 16:42:44 -0600 |
parents | d7e2523e7109 |
children | 39b5bc4e1853 |
files | lib/portability.h toys/posix/rm.c |
diffstat | 2 files changed, 1 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/portability.h Sun Jan 25 14:04:51 2015 -0600 +++ b/lib/portability.h Fri Feb 06 16:42:44 2015 -0600 @@ -150,12 +150,6 @@ #include <libgen.h> #endif -#ifdef __MUSL__ -#include <unistd.h> -// Without this "rm -r dir" fails with "is directory". -#define faccessat(A, B, C, D) faccessat(A, B, C, 0) -#endif - // Work out how to do endianness #ifndef __APPLE__
--- a/toys/posix/rm.c Sun Jan 25 14:04:51 2015 -0600 +++ b/toys/posix/rm.c Fri Feb 06 16:42:44 2015 -0600 @@ -48,7 +48,7 @@ // handle directory recursion if (dir) { // Handle chmod 000 directories when -f - if (faccessat(fd, try->name, R_OK, AT_SYMLINK_NOFOLLOW)) { + if (faccessat(fd, try->name, R_OK, 0)) { if (toys.optflags & FLAG_f) wfchmodat(fd, try->name, 0700); else goto skip; }