summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2015-11-08 20:38:23 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2015-11-08 20:38:23 +0100
commit8c142592ef695153781ac69eaa36b89da336c797 (patch)
treeddf2441e9380201769c66591a66650bccd26f282 /libc/sysdeps/linux
parentc797b9909cb53015c0a240a14d2788010f8b4f08 (diff)
add support for euidaccess/eaccess legacy functions
Implementation taken from musl libc project. Missing functions recognized by buildroot autobuilders with failing open-vm-tools.
Diffstat (limited to 'libc/sysdeps/linux')
-rw-r--r--libc/sysdeps/linux/common/Makefile.in1
-rw-r--r--libc/sysdeps/linux/common/euidaccess.c10
2 files changed, 11 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/common/Makefile.in b/libc/sysdeps/linux/common/Makefile.in
index b75b712ac..ade0ac3e2 100644
--- a/libc/sysdeps/linux/common/Makefile.in
+++ b/libc/sysdeps/linux/common/Makefile.in
@@ -24,6 +24,7 @@ CSRC-$(UCLIBC_LINUX_SPECIFIC) += \
capget.c \
capset.c \
dup3.c \
+ euidaccess.c \
eventfd.c \
eventfd_read.c \
eventfd_write.c \
diff --git a/libc/sysdeps/linux/common/euidaccess.c b/libc/sysdeps/linux/common/euidaccess.c
new file mode 100644
index 000000000..6e1f39855
--- /dev/null
+++ b/libc/sysdeps/linux/common/euidaccess.c
@@ -0,0 +1,10 @@
+#define _GNU_SOURCE
+#include <unistd.h>
+#include <fcntl.h>
+
+int euidaccess(const char *filename, int amode)
+{
+ return faccessat(AT_FDCWD, filename, amode, AT_EACCESS);
+}
+
+weak_alias(euidaccess, eaccess);