Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame^] | 1 | From 31ae6f42458f90d4994a4ad8e2b7673691612c36 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 06/11] 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 | open-vm-tools/lib/hgfsServer/hgfsServerLinux.c | 8 +++++--- |
| 14 | open-vm-tools/services/plugins/dndcp/dnd/dndLinux.c | 3 +-- |
| 15 | 2 files changed, 6 insertions(+), 5 deletions(-) |
| 16 | |
| 17 | Index: open-vm-tools/lib/hgfsServer/hgfsServerLinux.c |
| 18 | =================================================================== |
| 19 | --- open-vm-tools.orig/lib/hgfsServer/hgfsServerLinux.c |
| 20 | +++ open-vm-tools/lib/hgfsServer/hgfsServerLinux.c |
| 21 | @@ -107,11 +107,13 @@ typedef struct DirectoryEntry { |
| 22 | #endif |
| 23 | |
| 24 | /* |
| 25 | - * ALLPERMS (mode 07777) and ACCESSPERMS (mode 0777) are not defined in the |
| 26 | - * Solaris version of <sys/stat.h>. |
| 27 | + * ALLPERMS (mode 07777) and ACCESSPERMS (mode 0777) are not specified in |
| 28 | + * POSIX. |
| 29 | */ |
| 30 | -#ifdef sun |
| 31 | +#ifndef ACCESSPERMS |
| 32 | # define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO) |
| 33 | +#endif |
| 34 | +#ifndef ALLPERMS |
| 35 | # define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) |
| 36 | #endif |
| 37 | |
| 38 | Index: open-vm-tools/services/plugins/dndcp/dnd/dndLinux.c |
| 39 | =================================================================== |
| 40 | --- open-vm-tools.orig/services/plugins/dndcp/dnd/dndLinux.c |
| 41 | +++ open-vm-tools/services/plugins/dndcp/dnd/dndLinux.c |
| 42 | @@ -51,7 +51,7 @@ |
| 43 | |
| 44 | #define DND_ROOTDIR_PERMS (S_IRWXU | S_IRWXG | S_IRWXO) |
| 45 | #define DND_STAGINGDIR_PERMS (S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH) |
| 46 | -#ifdef sun |
| 47 | +#ifndef ACCESSPERMS |
| 48 | #define ACCESSPERMS (S_IRWXU | S_IRWXG | S_IRWXO) |
| 49 | #endif |
| 50 | #ifdef __ANDROID__ |
| 51 | @@ -60,7 +60,6 @@ |
| 52 | */ |
| 53 | #define NO_SETMNTENT |
| 54 | #define NO_ENDMNTENT |
| 55 | -#define ACCESSPERMS (S_IRWXU | S_IRWXG | S_IRWXO) |
| 56 | #endif |
| 57 | |
| 58 | |