Merge pull request #17303 from CarlosDerSeher/feature_bt_agent
[feed/packages.git] / utils / open-vm-tools / patches / 0004-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch
1 From 81da70dccfd03e6089be9ec509e43e697b8a58b3 Mon Sep 17 00:00:00 2001
2 From: Natanael Copa <ncopa@alpinelinux.org>
3 Date: Wed, 18 Nov 2015 09:10:14 +0000
4 Subject: [PATCH] Fix definition of ALLPERMS and ACCESSPERMS
5
6 The ALLPERMS and ACCESSPERMS defines are not specified in POSIX so
7 assume it is not there instead of testing for specific implementations.
8
9 This is needed for musl libc.
10
11 Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
12 ---
13 lib/hgfsServer/hgfsServerLinux.c | 8 +++++---
14 services/plugins/dndcp/dnd/dndLinux.c | 3 +--
15 2 files changed, 6 insertions(+), 5 deletions(-)
16
17 --- a/lib/hgfsServer/hgfsServerLinux.c
18 +++ b/lib/hgfsServer/hgfsServerLinux.c
19 @@ -105,11 +105,13 @@ typedef struct DirectoryEntry {
20 #endif
21
22 /*
23 - * ALLPERMS (mode 07777) and ACCESSPERMS (mode 0777) are not defined in the
24 - * Solaris version of <sys/stat.h>.
25 + * ALLPERMS (mode 07777) and ACCESSPERMS (mode 0777) are not specified in
26 + * POSIX.
27 */
28 -#ifdef sun
29 +#ifndef ACCESSPERMS
30 # define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO)
31 +#endif
32 +#ifndef ALLPERMS
33 # define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)
34 #endif
35
36 --- a/services/plugins/dndcp/dnd/dndLinux.c
37 +++ b/services/plugins/dndcp/dnd/dndLinux.c
38 @@ -53,7 +53,7 @@
39
40 #define DND_ROOTDIR_PERMS (S_IRWXU | S_IRWXG | S_IRWXO)
41 #define DND_STAGINGDIR_PERMS (S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH)
42 -#ifdef sun
43 +#ifndef ACCESSPERMS
44 #define ACCESSPERMS (S_IRWXU | S_IRWXG | S_IRWXO)
45 #endif
46 #ifdef __ANDROID__
47 @@ -62,7 +62,6 @@
48 */
49 #define NO_SETMNTENT
50 #define NO_ENDMNTENT
51 -#define ACCESSPERMS (S_IRWXU | S_IRWXG | S_IRWXO)
52 #endif
53
54