0006-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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] Fix definition of ALLPERMS and ACCESSPERMS
  5. The ALLPERMS and ACCESSPERMS defines are not specified in POSIX so
  6. assume it is not there instead of testing for specific implementations.
  7. This is needed for musl libc.
  8. Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
  9. [Retrieved from:
  10. 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]
  11. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  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. Index: open-vm-tools/lib/hgfsServer/hgfsServerLinux.c
  17. ===================================================================
  18. --- open-vm-tools.orig/lib/hgfsServer/hgfsServerLinux.c
  19. +++ open-vm-tools/lib/hgfsServer/hgfsServerLinux.c
  20. @@ -107,11 +107,13 @@ typedef struct DirectoryEntry {
  21. #endif
  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. Index: open-vm-tools/services/plugins/dndcp/dnd/dndLinux.c
  36. ===================================================================
  37. --- open-vm-tools.orig/services/plugins/dndcp/dnd/dndLinux.c
  38. +++ open-vm-tools/services/plugins/dndcp/dnd/dndLinux.c
  39. @@ -51,7 +51,7 @@
  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. @@ -60,7 +60,6 @@
  48. */
  49. #define NO_SETMNTENT
  50. #define NO_ENDMNTENT
  51. -#define ACCESSPERMS (S_IRWXU | S_IRWXG | S_IRWXO)
  52. #endif