2022-04-07 08:17:49 +00:00
|
|
|
From 81da70dccfd03e6089be9ec509e43e697b8a58b3 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Natanael Copa <ncopa@alpinelinux.org>
|
|
|
|
Date: Wed, 18 Nov 2015 09:10:14 +0000
|
|
|
|
Subject: [PATCH] Fix definition of ALLPERMS and ACCESSPERMS
|
|
|
|
|
|
|
|
The ALLPERMS and ACCESSPERMS defines are not specified in POSIX so
|
|
|
|
assume it is not there instead of testing for specific implementations.
|
|
|
|
|
|
|
|
This is needed for musl libc.
|
|
|
|
|
|
|
|
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
|
|
|
|
---
|
|
|
|
lib/hgfsServer/hgfsServerLinux.c | 8 +++++---
|
|
|
|
services/plugins/dndcp/dnd/dndLinux.c | 3 +--
|
|
|
|
2 files changed, 6 insertions(+), 5 deletions(-)
|
|
|
|
|
2019-02-25 03:02:55 +00:00
|
|
|
--- a/lib/hgfsServer/hgfsServerLinux.c
|
|
|
|
+++ b/lib/hgfsServer/hgfsServerLinux.c
|
2020-11-30 10:46:48 +00:00
|
|
|
@@ -105,11 +105,13 @@ typedef struct DirectoryEntry {
|
2019-02-25 03:02:55 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
- * ALLPERMS (mode 07777) and ACCESSPERMS (mode 0777) are not defined in the
|
|
|
|
- * Solaris version of <sys/stat.h>.
|
|
|
|
+ * ALLPERMS (mode 07777) and ACCESSPERMS (mode 0777) are not specified in
|
|
|
|
+ * POSIX.
|
|
|
|
*/
|
|
|
|
-#ifdef sun
|
|
|
|
+#ifndef ACCESSPERMS
|
|
|
|
# define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO)
|
|
|
|
+#endif
|
|
|
|
+#ifndef ALLPERMS
|
|
|
|
# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
--- a/services/plugins/dndcp/dnd/dndLinux.c
|
|
|
|
+++ b/services/plugins/dndcp/dnd/dndLinux.c
|
2020-10-09 01:48:55 +00:00
|
|
|
@@ -53,7 +53,7 @@
|
2019-02-25 03:02:55 +00:00
|
|
|
|
|
|
|
#define DND_ROOTDIR_PERMS (S_IRWXU | S_IRWXG | S_IRWXO)
|
|
|
|
#define DND_STAGINGDIR_PERMS (S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH)
|
|
|
|
-#ifdef sun
|
|
|
|
+#ifndef ACCESSPERMS
|
|
|
|
#define ACCESSPERMS (S_IRWXU | S_IRWXG | S_IRWXO)
|
|
|
|
#endif
|
|
|
|
#ifdef __ANDROID__
|
2022-04-07 08:17:49 +00:00
|
|
|
@@ -62,7 +62,6 @@
|
|
|
|
*/
|
|
|
|
#define NO_SETMNTENT
|
|
|
|
#define NO_ENDMNTENT
|
|
|
|
-#define ACCESSPERMS (S_IRWXU | S_IRWXG | S_IRWXO)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|