summaryrefslogtreecommitdiff
path: root/drivers/vulkan
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-02-14 15:32:03 +0100
committerRémi Verschelde <rverschelde@gmail.com>2020-02-14 15:32:04 +0100
commit79a7be6e7d543afc13467c35c47062724df1bd69 (patch)
tree83e357809d649076508b545e6e9ad5a2631dce5c /drivers/vulkan
parent09e5877ff5cd72b684bceddab8c203cc897dbb6c (diff)
Vulkan-Loader: Mark secure_getenv as available on Linux
It's a GNU extension part of glibc since 2.17, and it was also added recently to musl libc. It doesn't seem to be available on *BSD (but also not used there by Vulkan-Loader). Could be made more thorough by doing a test compilation of a file to check for the existence of the function on the host system, but unless we run into actual issues, that's likely overkill.
Diffstat (limited to 'drivers/vulkan')
-rw-r--r--drivers/vulkan/SCsub4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/vulkan/SCsub b/drivers/vulkan/SCsub
index 8d6eb6b199..2576f68f92 100644
--- a/drivers/vulkan/SCsub
+++ b/drivers/vulkan/SCsub
@@ -57,6 +57,10 @@ if env['builtin_vulkan']:
'FALLBACK_DATA_DIRS=\\"%s\\"' % '/usr/local/share:/usr/share',
'FALLBACK_CONFIG_DIRS=\\"%s\\"' % '/etc/xdg'
])
+ import platform
+ if (platform.system() == "Linux"):
+ # In glibc since 2.17 and musl libc since 1.1.24. Used by loader.c.
+ env_thirdparty.AppendUnique(CPPDEFINES=['HAVE_SECURE_GETENV'])
loader_sources = [thirdparty_dir + "/loader/" + file for file in loader_sources]
env_thirdparty.add_source_files(env.drivers_sources, loader_sources)