aboutsummaryrefslogtreecommitdiff
path: root/graphics/vulkan-loader/files/patch-loader_loader.c
blob: 30b588023daa04eb3bf2ecf7efae69784e601c36 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- loader/loader.c.orig	2021-04-20 16:45:05 UTC
+++ loader/loader.c
@@ -253,7 +253,7 @@ void *loader_device_heap_realloc(const struct loader_d
 }
 
 // Environment variables
-#if defined(__linux__) || defined(__APPLE__) || defined(__Fuchsia__) || defined(__QNXNTO__)
+#if defined(__unix__) || defined(__APPLE__) || defined(__Fuchsia__) || defined(__QNXNTO__)
 
 static inline bool IsHighIntegrity() {
     return geteuid() != getuid() || getegid() != getgid();
@@ -268,7 +268,7 @@ static inline char *loader_getenv(const char *name, co
 
 static inline char *loader_secure_getenv(const char *name, const struct loader_instance *inst) {
     char *out;
-#if defined(__APPLE__)
+#if !defined(__linux__)
     // Apple does not appear to have a secure getenv implementation.
     // The main difference between secure getenv and getenv is that secure getenv
     // returns NULL if the process is being run with elevated privileges by a normal user.