On 9/8/24 8:12 AM, liezhi.yang@xxxxxxxxxxxxx wrote:
From: Robert Yang <liezhi.yang@xxxxxxxxxxxxx>
Fixed 1:
In file included from cache.c:1217:
../../support/include/junction.h:128:21: error: expected ';' before 'char'
128 | __attribute_malloc__
| ^
| ;
129 | char **nfs_dup_string_array(char **array);
Fixed 2:
junction.c: In function 'junction_set_sticky_bit':
junction.c:164:39: error: 'ALLPERMS' undeclared (first use in this function)
164 | stb.st_mode &= (unsigned int)~ALLPERMS;
Signed-off-by: Robert Yang <liezhi.yang@xxxxxxxxxxxxx>
Both committed... (tag: nfs-utils-2-7-2-rc1)
steved.
---
support/include/junction.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/support/include/junction.h b/support/include/junction.h
index 7257d80b..d127dd55 100644
--- a/support/include/junction.h
+++ b/support/include/junction.h
@@ -26,6 +26,16 @@
#ifndef _NFS_JUNCTION_H_
#define _NFS_JUNCTION_H_
+/* For musl, refered to glibc's sys/cdefs.h */
+#ifndef __attribute_malloc__
+#define __attribute_malloc__ __attribute__((__malloc__))
+#endif
+
+/* For musl, refered to glibc's sys/stat.h */
+#ifndef ALLPERMS
+#define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */
+#endif
+
#include <stdint.h>
/*