]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/blob
c94990b96920b2eb4f894fe4e5c97287238637de
[thirdparty/openembedded/openembedded-core-contrib.git] /
1 From 6f82ffa0e01e88e4e73972cb0125fcb6e78e27cf Mon Sep 17 00:00:00 2001
2 From: Robert Yang <liezhi.yang@windriver.com>
3 Date: Sun, 8 Sep 2024 09:45:41 +0000
4 Subject: [PATCH] support/include/junction.h: Define macros for musl
5
6 Fixed 1:
7 In file included from cache.c:1217:
8 ../../support/include/junction.h:128:21: error: expected ';' before 'char'
9 128 | __attribute_malloc__
10 | ^
11 | ;
12 129 | char **nfs_dup_string_array(char **array);
13
14 Fixed 2:
15 junction.c: In function 'junction_set_sticky_bit':
16 junction.c:164:39: error: 'ALLPERMS' undeclared (first use in this function)
17 164 | stb.st_mode &= (unsigned int)~ALLPERMS;
18
19 Upstream-Status: Submitted [https://marc.info/?l=linux-nfs&m=172579572428765&w=2]
20
21 Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
22 ---
23 support/include/junction.h | 10 ++++++++++
24 1 file changed, 10 insertions(+)
25
26 diff --git a/support/include/junction.h b/support/include/junction.h
27 index 7257d80..d127dd5 100644
28 --- a/support/include/junction.h
29 +++ b/support/include/junction.h
30 @@ -26,6 +26,16 @@
31 #ifndef _NFS_JUNCTION_H_
32 #define _NFS_JUNCTION_H_
33
34 +/* For musl, refered to glibc's sys/cdefs.h */
35 +#ifndef __attribute_malloc__
36 +#define __attribute_malloc__ __attribute__((__malloc__))
37 +#endif
38 +
39 +/* For musl, refered to glibc's sys/stat.h */
40 +#ifndef ALLPERMS
41 +#define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */
42 +#endif
43 +
44 #include <stdint.h>
45
46 /*