path: root/xlators/features/index
diff options
authorEmmanuel Dreyfus <>2013-12-28 08:31:55 +0100
committerVijay Bellur <>2014-01-02 22:02:09 -0800
commitf54e9ca3897177ee41b5f5299b94b719448c46cd (patch)
tree7a8d4893f036ce9b6ba9b4676542a4841065fa87 /xlators/features/index
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 <> Reviewed-on: Tested-by: Gluster Build System <> Reviewed-by: Vijay Bellur <>
Diffstat (limited to 'xlators/features/index')
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/features/index/src/index.c b/xlators/features/index/src/index.c
index 6c634dd..4ba72c0 100644
--- a/xlators/features/index/src/index.c
+++ b/xlators/features/index/src/index.c
@@ -409,7 +409,8 @@ sync_base_indices (void *index_priv)
/* see HAVE_LINKAT in xlators/storage/posix/src/posix.c */
- ret = linkat (AT_FDCWD, xattrop_index_path, AT_FDCWD, base_index_path, 0);
+ ret = linkat (AT_FDCWD, xattrop_index_path,
+ AT_FDCWD, base_index_path, 0);
ret = link (xattrop_index_path, base_index_path);