summaryrefslogtreecommitdiffstats
path: root/patches/fakeroot-1.20.2/0002-glibc-xattr-types.patch
blob: a6104de09a049f4f7524ee343a05b14636646e21 (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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
From: unknown author <unknown.author@example.com>
Date: Wed, 27 May 2015 15:58:57 +0200
Subject: [PATCH] glibc-xattr-types

Fix the type of xattr functions to match the glibc headers.
---
 libfakeroot.c | 16 ++++++++--------
 wrapfunc.inp  | 12 ++++++------
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/libfakeroot.c b/libfakeroot.c
index 5b92bbea5fb8..4fd620f8a5f0 100644
--- a/libfakeroot.c
+++ b/libfakeroot.c
@@ -1570,7 +1570,7 @@ int capset(cap_user_header_t hdrp, const cap_user_data_t datap)
 #endif /* HAVE_CAPSET */
 
 #if defined(HAVE_SETXATTR) || defined(HAVE_LSETXATTR) || defined(HAVE_FSETXATTR)
-static size_t common_setxattr(INT_STRUCT_STAT *st, const char *name, void * value, size_t size, int flags)
+static int common_setxattr(INT_STRUCT_STAT *st, const char *name, const void * value, size_t size, int flags)
 {
   xattr_args xattr;
   xattr.name = name;
@@ -1625,7 +1625,7 @@ static size_t common_listxattr(INT_STRUCT_STAT *st, char *list, size_t size)
 #endif /* defined(HAVE_LISTXATTR) || defined(HAVE_LLISTXATTR) || defined(HAVE_FLISTXATTR) */
 
 #if defined(HAVE_REMOVEXATTR) || defined(HAVE_LREMOVEXATTR) || defined(HAVE_FREMOVEXATTR)
-static size_t common_removexattr(INT_STRUCT_STAT *st, const char *name)
+static int common_removexattr(INT_STRUCT_STAT *st, const char *name)
 {
   xattr_args xattr;
   xattr.name = name;
@@ -1643,7 +1643,7 @@ static size_t common_removexattr(INT_STRUCT_STAT *st, const char *name)
 #endif /* defined(HAVE_REMOVEXATTR) || defined(HAVE_LREMOVEXATTR) || defined(HAVE_FREMOVEXATTR) */
 
 #ifdef HAVE_SETXATTR
-ssize_t setxattr(const char *path, const char *name, void *value, size_t size, int flags)
+int setxattr(const char *path, const char *name, const void *value, size_t size, int flags)
 {
   INT_STRUCT_STAT st;
   int r;
@@ -1664,7 +1664,7 @@ ssize_t setxattr(const char *path, const char *name, void *value, size_t size, i
 #endif /* HAVE_SETXATTR */
 
 #ifdef HAVE_LSETXATTR
-ssize_t lsetxattr(const char *path, const char *name, void *value, size_t size, int flags)
+int lsetxattr(const char *path, const char *name, const void *value, size_t size, int flags)
 {
   INT_STRUCT_STAT st;
   int r;
@@ -1685,7 +1685,7 @@ ssize_t lsetxattr(const char *path, const char *name, void *value, size_t size,
 #endif /* HAVE_LSETXATTR */
 
 #ifdef HAVE_FSETXATTR
-ssize_t fsetxattr(int fd, const char *name, void *value, size_t size, int flags)
+int fsetxattr(int fd, const char *name, const void *value, size_t size, int flags)
 {
   INT_STRUCT_STAT st;
   int r;
@@ -1832,7 +1832,7 @@ ssize_t flistxattr(int fd, char *list, size_t size)
 #endif /* HAVE_FLISTXATTR */
 
 #ifdef HAVE_REMOVEXATTR
-ssize_t removexattr(const char *path, const char *name)
+int removexattr(const char *path, const char *name)
 {
   INT_STRUCT_STAT st;
   int r;
@@ -1853,7 +1853,7 @@ ssize_t removexattr(const char *path, const char *name)
 #endif /* HAVE_REMOVEXATTR */
 
 #ifdef HAVE_LREMOVEXATTR
-ssize_t lremovexattr(const char *path, const char *name)
+int lremovexattr(const char *path, const char *name)
 {
   INT_STRUCT_STAT st;
   int r;
@@ -1874,7 +1874,7 @@ ssize_t lremovexattr(const char *path, const char *name)
 #endif /* HAVE_LREMOVEXATTR */
 
 #ifdef HAVE_FREMOVEXATTR
-ssize_t fremovexattr(int fd, const char *name)
+int fremovexattr(int fd, const char *name)
 {
   INT_STRUCT_STAT st;
   int r;
diff --git a/wrapfunc.inp b/wrapfunc.inp
index 5eff0cc08412..15855018c6a4 100644
--- a/wrapfunc.inp
+++ b/wrapfunc.inp
@@ -168,22 +168,22 @@ lgetxattr;ssize_t;(const char *path, const char *name, void *value, size_t size)
 fgetxattr;ssize_t;(int fd, const char *name, void *value, size_t size);(fd, name, value, size)
 #endif /* HAVE_FGETXATTR */
 #ifdef HAVE_SETXATTR
-setxattr;ssize_t;(const char *path, const char *name, void *value, size_t size, int flags);(path, name, value, size, flags)
+setxattr;int;(const char *path, const char *name, const void *value, size_t size, int flags);(path, name, value, size, flags)
 #endif /* HAVE_SETXATTR */
 #ifdef HAVE_LSETXATTR
-lsetxattr;ssize_t;(const char *path, const char *name, void *value, size_t size, int flags);(path, name, value, size, flags)
+lsetxattr;int;(const char *path, const char *name, const void *value, size_t size, int flags);(path, name, value, size, flags)
 #endif /* HAVE_LSETXATTR */
 #ifdef HAVE_FSETXATTR
-fsetxattr;ssize_t;(int fd, const char *name, void *value, size_t size, int flags);(fd, name, value, size, flags)
+fsetxattr;int;(int fd, const char *name, const void *value, size_t size, int flags);(fd, name, value, size, flags)
 #endif /* HAVE_FSETXATTR */
 #ifdef HAVE_REMOVEXATTR
-removexattr;ssize_t;(const char *path, const char *name);(path, name)
+removexattr;int;(const char *path, const char *name);(path, name)
 #endif /* HAVE_REMOVEXATTR */
 #ifdef HAVE_LREMOVEXATTR
-lremovexattr;ssize_t;(const char *path, const char *name);(path, name)
+lremovexattr;int;(const char *path, const char *name);(path, name)
 #endif /* HAVE_LREMOVEXATTR */
 #ifdef HAVE_FREMOVEXATTR
-fremovexattr;ssize_t;(int fd, const char *name);(fd, name)
+fremovexattr;int;(int fd, const char *name);(fd, name)
 #endif /* HAVE_FREMOVEXATTR */
 
 #ifdef HAVE_FSTATAT