summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Dreyfus <manu@netbsd.org>2014-02-12 14:39:03 +0100
committerVijay Bellur <vbellur@redhat.com>2014-02-13 01:10:07 -0800
commit13f1d250ccbb7a3c945e35ebf182e7149b69069e (patch)
tree8bbe217bdc59f25c89dc8fdfbd10b4d44646a150
parent43f71899c4533ef6e160c7a8fb8c62bf0e6c3bba (diff)
Use libglusterfs wrapper to make setxattr portable
BUG: 764655 Change-Id: I332922521bef5684f18d5f7b226cb36d5303ae47 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/6982 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r--extras/geo-rep/gsync-sync-gfid.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/extras/geo-rep/gsync-sync-gfid.c b/extras/geo-rep/gsync-sync-gfid.c
index 601f4720e25..953eb535132 100644
--- a/extras/geo-rep/gsync-sync-gfid.c
+++ b/extras/geo-rep/gsync-sync-gfid.c
@@ -4,10 +4,11 @@
#include <string.h>
#include <limits.h>
#include <sys/types.h>
-#include <attr/xattr.h>
#include <libgen.h>
#include <ctype.h>
#include <stdlib.h>
+#include "glusterfs.h"
+#include "syscall.h"
#ifndef UUID_CANONICAL_FORM_LEN
#define UUID_CANONICAL_FORM_LEN 36
@@ -86,8 +87,8 @@ main (int argc, char *argv[])
memcpy (tmp_blob, bname, strlen (bname));
- ret = setxattr (parent_dir, GF_FUSE_AUX_GFID_HEAL, blob, len,
- 0);
+ ret = sys_lsetxattr (parent_dir, GF_FUSE_AUX_GFID_HEAL,
+ blob, len, 0);
if (ret < 0) {
fprintf (stderr, "setxattr on %s/%s failed (%s)\n",
parent_dir, bname, strerror (errno));