summaryrefslogtreecommitdiff
path: root/tbdiff/tbdiff-xattrs.c
diff options
context:
space:
mode:
authorBen Brewer <ben.brewer@codethink.co.uk>2014-06-02 15:51:02 +0100
committerBen Brewer <ben.brewer@codethink.co.uk>2014-06-02 15:52:15 +0100
commit20d5fb340c6ad1e7b16c6dc17e3f6c364a5a5515 (patch)
tree3b8966f7eaa6855c0718b52437a374b710a51eca /tbdiff/tbdiff-xattrs.c
parent485e76fea076b2a5f0efeab3ac7f98037f4e00c0 (diff)
parentfb454c327097dda283c35a911fef141382aa383f (diff)
downloadtbdiff-20d5fb340c6ad1e7b16c6dc17e3f6c364a5a5515.tar.gz
Merge branch 'baserock/benbrewer/overhaul-v2'
Reviewed-by: Richard Maw Reviewed-by: Lars Wirzenius
Diffstat (limited to 'tbdiff/tbdiff-xattrs.c')
-rw-r--r--tbdiff/tbdiff-xattrs.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/tbdiff/tbdiff-xattrs.c b/tbdiff/tbdiff-xattrs.c
index 95d263f..c020ee5 100644
--- a/tbdiff/tbdiff-xattrs.c
+++ b/tbdiff/tbdiff-xattrs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2011-2012 Codethink Ltd.
+ * Copyright (C) 2011-2014 Codethink Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License Version 2 as
@@ -18,7 +18,14 @@
#include <string.h>
#include <stdlib.h>
+#include "config.h"
+
+#if HAVE_ATTR_XATTR_H
#include <attr/xattr.h>
+#else
+#include <sys/xattr.h>
+#endif
+
#include <errno.h>
#include <tbdiff/tbdiff-common.h>
@@ -117,7 +124,7 @@ static int name_remove(char const *name, void *ud) {
char const *path = ud;
if (lremovexattr(path, name) < 0) {
switch (errno) {
- case ENOATTR:
+ case ENODATA:
return TBD_ERROR(TBD_ERROR_XATTRS_MISSING_ATTR);
case ENOTSUP:
return TBD_ERROR(TBD_ERROR_XATTRS_NOT_SUPPORTED);