summaryrefslogtreecommitdiff
path: root/kde-frameworks/kfilemetadata/files/kfilemetadata-5.42.0-xattr-header.patch
blob: 4d86297b19ca68a877333f1abc653775f81f37ce (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
From 6de64a4e3f2713c0096eb7ee1ba52e5fbbbc401f Mon Sep 17 00:00:00 2001
From: Lars Wendler <polynomial-c@gentoo.org>
Date: Sun, 14 Jan 2018 22:29:25 +0100
Subject: [PATCH] Fix build with >=attr-2.4.48

It was looking for long deprecated attr/xattr.h header.
---
 cmake/FindXattr.cmake | 2 +-
 src/xattr_p.h         | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/cmake/FindXattr.cmake b/cmake/FindXattr.cmake
index 3004061..a33f316 100644
--- a/cmake/FindXattr.cmake
+++ b/cmake/FindXattr.cmake
@@ -13,7 +13,7 @@ if (XATTR_INCLUDE_DIRS AND XATTR_LIBRARIES)
     set(XATTR_FOUND TRUE)
 else ()
 
-    find_path(XATTR_INCLUDE attr/xattr.h
+    find_path(XATTR_INCLUDE sys/xattr.h
         /usr/include
         /usr/local/include
         ${CMAKE_INCLUDE_PATH}
diff --git a/src/xattr_p.h b/src/xattr_p.h
index 4663347..542c021 100644
--- a/src/xattr_p.h
+++ b/src/xattr_p.h
@@ -32,13 +32,11 @@
 #include <sys/types.h>
 #include <sys/xattr.h>
 
-#if defined(Q_OS_ANDROID)
+#if defined(Q_OS_ANDROID) || defined(Q_OS_LINUX)
 // attr/xattr.h is not available in the Android NDK so we are defining ENOATTR ourself
 #ifndef ENOATTR
 # define ENOATTR ENODATA        /* No such attribute */
 #endif
-#else
-#include <attr/xattr.h>
 #endif
 
 #include <errno.h>
-- 
2.15.1