70 lines
2.4 KiB
Diff
70 lines
2.4 KiB
Diff
From 173f8a311b63e3a7505905dd51747030eba81ee0 Mon Sep 17 00:00:00 2001
|
|
Message-ID: <173f8a311b63e3a7505905dd51747030eba81ee0.1693922825.git.stefan@agner.ch>
|
|
In-Reply-To: <b978727972e1a8b7e3f14886395047e5809b7a81.1693922825.git.stefan@agner.ch>
|
|
References: <b978727972e1a8b7e3f14886395047e5809b7a81.1693922825.git.stefan@agner.ch>
|
|
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>
|
|
[Retrieved from:
|
|
http://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-support/open-vm-tools/open-vm-tools/0006-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch?h=sumo]
|
|
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
[rebased against stable-12.3.0]
|
|
Signed-off-by: Stefan Agner <stefan@agner.ch>
|
|
---
|
|
lib/hgfsServer/hgfsServerLinux.c | 8 +++++---
|
|
services/plugins/dndcp/dnd/dndLinux.c | 3 +--
|
|
2 files changed, 6 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/lib/hgfsServer/hgfsServerLinux.c b/lib/hgfsServer/hgfsServerLinux.c
|
|
index 4a0bc937..6ed49e2b 100644
|
|
--- a/lib/hgfsServer/hgfsServerLinux.c
|
|
+++ b/lib/hgfsServer/hgfsServerLinux.c
|
|
@@ -105,11 +105,13 @@ typedef struct DirectoryEntry {
|
|
#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
|
|
|
|
diff --git a/services/plugins/dndcp/dnd/dndLinux.c b/services/plugins/dndcp/dnd/dndLinux.c
|
|
index 219065f7..b5b7e620 100644
|
|
--- a/services/plugins/dndcp/dnd/dndLinux.c
|
|
+++ b/services/plugins/dndcp/dnd/dndLinux.c
|
|
@@ -53,7 +53,7 @@
|
|
|
|
#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__
|
|
@@ -62,7 +62,6 @@
|
|
*/
|
|
#define NO_SETMNTENT
|
|
#define NO_ENDMNTENT
|
|
-#define ACCESSPERMS (S_IRWXU | S_IRWXG | S_IRWXO)
|
|
#endif
|
|
|
|
|
|
--
|
|
2.42.0
|
|
|