aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/mach/hurd/lxstat.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-11-11 22:47:13 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-11-11 23:56:56 +0000
commit85741f7eba716db09f586bc94aaa9a6b5dc2347f (patch)
treea54aedc2139d0ab78c7b7a4d55a5c4b08f06fb2c /sysdeps/mach/hurd/lxstat.c
parent1ccbb9258eed0f667edf459a28ba23a805549b36 (diff)
downloadglibc-85741f7eba716db09f586bc94aaa9a6b5dc2347f.tar
glibc-85741f7eba716db09f586bc94aaa9a6b5dc2347f.tar.gz
glibc-85741f7eba716db09f586bc94aaa9a6b5dc2347f.tar.bz2
glibc-85741f7eba716db09f586bc94aaa9a6b5dc2347f.zip
hurd: Move {,f,l}xstat{,at} and xmknod{at} to compat symbols
We do not actually need them, so we can move their implementations into the standard {,f,l}stat{,at} variants and only keep compatibility wrappers.
Diffstat (limited to 'sysdeps/mach/hurd/lxstat.c')
-rw-r--r--sysdeps/mach/hurd/lxstat.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sysdeps/mach/hurd/lxstat.c b/sysdeps/mach/hurd/lxstat.c
index 382ece2d5c..ba40612f50 100644
--- a/sysdeps/mach/hurd/lxstat.c
+++ b/sysdeps/mach/hurd/lxstat.c
@@ -18,14 +18,19 @@
#include <errno.h>
#include <sys/stat.h>
#include <stddef.h>
+#include <hurd.h>
+#include <shlib-compat.h>
-#include "xstatconv.c"
+#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
int
__lxstat (int vers, const char *file, struct stat *buf)
{
- struct stat64 buf64;
- return __lxstat64 (vers, file, &buf64) ?: xstat64_conv (buf, &buf64);
+ if (vers != _STAT_VER)
+ return __hurd_fail (EINVAL);
+
+ return __lstat (file, buf);
}
-hidden_def (__lxstat)
weak_alias (__lxstat, _lxstat)
+
+#endif