From f54e9ca3897177ee41b5f5299b94b719448c46cd Mon Sep 17 00:00:00 2001 From: Emmanuel Dreyfus Date: Sat, 28 Dec 2013 08:31:55 +0100 Subject: 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: http://review.gluster.org/6613 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/features/index/src/index.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xlators/features/index') diff --git a/xlators/features/index/src/index.c b/xlators/features/index/src/index.c index 6c634dd9ad1..4ba72c02234 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) #ifdef HAVE_LINKAT /* 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); #else ret = link (xattrop_index_path, base_index_path); #endif -- cgit