summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src
diff options
context:
space:
mode:
authorEmmanuel Dreyfus <manu@netbsd.org>2013-12-28 08:31:55 +0100
committerVijay Bellur <vbellur@redhat.com>2014-01-02 22:02:09 -0800
commitf54e9ca3897177ee41b5f5299b94b719448c46cd (patch)
tree7a8d4893f036ce9b6ba9b4676542a4841065fa87 /libglusterfs/src
parentd1f8b7ebc71df415f6b8ff37e9654ecee0d9064c (diff)
Use linkat() instead of link() for portability sake
POSIX does not says wether link(2) on symlink should link on symlink itself or on target. Linux use symlink, most other systems use target. Using linkat(2) allows the behavior to be specified, so that the behavior is portable. Also fix configure test for NetBSD linkat(2), which ceased to work. BUG: 764655 Change-Id: I2633fde3b0828ca8c199e11c827720c513e15852 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/6613 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'libglusterfs/src')
-rw-r--r--libglusterfs/src/syscall.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libglusterfs/src/syscall.c b/libglusterfs/src/syscall.c
index a619f9c41a6..117fa209e21 100644
--- a/libglusterfs/src/syscall.c
+++ b/libglusterfs/src/syscall.c
@@ -120,7 +120,7 @@ sys_rename (const char *oldpath, const char *newpath)
int
sys_link (const char *oldpath, const char *newpath)
{
-#ifdef HAVE_LINKAT
+#ifdef HAVE_LINKAT
/* see HAVE_LINKAT in xlators/storage/posix/src/posix.c */
return linkat (AT_FDCWD, oldpath, AT_FDCWD, newpath, 0);
#else