From 2284eb487549bafa23ddc3244ad3458ad42994fe Mon Sep 17 00:00:00 2001 From: Niels Sascha Reedijk Date: Sun, 29 Apr 2018 08:38:10 +0200 Subject: [PATCH] Add ALLPERMS and DEFFILEMODE to enable building on hosts with the musl c library --- headers/build/BeOSBuildCompatibility.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/headers/build/BeOSBuildCompatibility.h b/headers/build/BeOSBuildCompatibility.h index faa402ed51..582f97e1cb 100644 --- a/headers/build/BeOSBuildCompatibility.h +++ b/headers/build/BeOSBuildCompatibility.h @@ -7,11 +7,18 @@ # endif #endif -#if defined(HAIKU_HOST_PLATFORM_CYGWIN) || defined(HAIKU_HOST_PLATFORM_SUNOS) +// DEFFILEMODE is not available on Cygwin, SunOS and when building with musl c +#if defined(HAIKU_HOST_PLATFORM_CYGWIN) || defined(HAIKU_HOST_PLATFORM_SUNOS) \ + || !defined(DEFFILEMODE) #ifndef DEFFILEMODE #define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) #endif +// There's no ALLPERMS when building with musl c +#ifndef ALLPERMS +# define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) +#endif + #ifndef S_IUMSK #define S_IUMSK 07777 #endif