summaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
authorEmmanuel Dreyfus <manu@netbsd.org>2014-02-12 14:39:03 +0100
committerVijay Bellur <vbellur@redhat.com>2014-02-18 06:46:23 -0800
commit482434d3832dbff47df47be08c33c048a98d2fb7 (patch)
tree376ae01290eccda2ef9268f6b5d16bdd633ca53d /extras
parent5b2d308f4b3969e37ceca7648165add1badb0de3 (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> Reviewed-on: http://review.gluster.org/7008 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'extras')
-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 601f472..3dea776 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));