summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/syscall.c
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/syscall.c')
-rw-r--r--libglusterfs/src/syscall.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libglusterfs/src/syscall.c b/libglusterfs/src/syscall.c
index e8954cc..a619f9c 100644
--- a/libglusterfs/src/syscall.c
+++ b/libglusterfs/src/syscall.c
@@ -120,7 +120,12 @@ sys_rename (const char *oldpath, const char *newpath)
int
sys_link (const char *oldpath, const char *newpath)
{
+#ifdef HAVE_LINKAT
+ /* see HAVE_LINKAT in xlators/storage/posix/src/posix.c */
+ return linkat (AT_FDCWD, oldpath, AT_FDCWD, newpath, 0);
+#else
return link (oldpath, newpath);
+#endif
}