summaryrefslogtreecommitdiff
blob: cbc879008dfe43fecefada64c73f3f7953b69e3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
From 57759f2b1106b6d19f3bc11b21463f4307dfc3d8 Mon Sep 17 00:00:00 2001
From: Lars Wendler <polynomial-c@gentoo.org>
Date: Tue, 20 Feb 2018 10:13:30 +0100
Subject: [PATCH] Replace <attr/xattr.h> with <sys/xattr.h>

The former has been long deprecated and removed in attr-2.4.48
---
 configure.ac       | 2 +-
 src/oper_restore.c | 3 ++-
 src/oper_save.c    | 7 ++++++-
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 66cfbf3..ae9aae8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -114,7 +114,7 @@ PKG_CHECK_MODULES([BLKID], [blkid])
 PKG_CHECK_MODULES([UUID], [uuid])
 
 dnl Check for header files installed with a library
-AC_CHECK_HEADER([attr/xattr.h],, [AC_MSG_ERROR([attr/xattr.h not found. you may have to install a package called attr, libattr, libattr-devel])])
+AC_CHECK_HEADER([sys/xattr.h],, [AC_MSG_ERROR([sys/xattr.h not found.])])
 
 dnl Check for standard header files.
 AC_CHECK_HEADERS([malloc.h unistd.h pthread.h])
diff --git a/src/oper_restore.c b/src/oper_restore.c
index dd8af1f..92eb5f6 100644
--- a/src/oper_restore.c
+++ b/src/oper_restore.c
@@ -24,7 +24,8 @@
 #include <assert.h>
 #include <string.h>
 #include <stdlib.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
+#include <errno.h>
 #include <sys/time.h>
 #include <sys/stat.h>
 #include <gcrypt.h>
diff --git a/src/oper_save.c b/src/oper_save.c
index ce6f194..ff29074 100644
--- a/src/oper_save.c
+++ b/src/oper_save.c
@@ -29,7 +29,8 @@
 #include <sys/param.h>
 #include <sys/statvfs.h>
 #include <sys/stat.h>
-#include <attr/xattr.h>
+#include <sys/xattr.h>
+#include <errno.h>
 #include <zlib.h>
 #include <assert.h>
 #include <gcrypt.h>
@@ -59,6 +60,10 @@
 #include "error.h"
 #include "queue.h"
 
+#ifndef ENOATTR
+#define ENOATTR ENODATA
+#endif
+
 typedef struct s_savear
 {   carchwriter ai;
     cregmulti   regmulti;
-- 
2.16.2