summaryrefslogtreecommitdiff
path: root/src/helper
diff options
context:
space:
mode:
Diffstat (limited to 'src/helper')
-rw-r--r--src/helper/slbt_realpath.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/helper/slbt_realpath.c b/src/helper/slbt_realpath.c
index bae41ec..6b48831 100644
--- a/src/helper/slbt_realpath.c
+++ b/src/helper/slbt_realpath.c
@@ -15,6 +15,10 @@
#include "slibtool_driver_impl.h"
#include "slibtool_readlink_impl.h"
+#ifdef __unix__
+#include <sys/syscall.h>
+#endif
+
#ifdef _MIDIPIX_ABI
#include <sys/fs.h>
#endif
@@ -23,6 +27,10 @@
#define ENOTSUP EOPNOTSUPP
#endif
+#ifdef SYS___realpathat
+extern long syscall(int, ...);
+#endif
+
int slbt_realpath(
int fdat,
const char * path,
@@ -48,6 +56,10 @@ int slbt_realpath(
return __fs_rpath(fdat,path,options,buf,buflen);
#endif
+#ifdef SYS___realpathat
+ return syscall(SYS___realpathat,fdat,path,buf,buflen,0);
+#endif
+
/* buflen */
if (buflen < PATH_MAX) {
errno = ENOBUFS;