include two missing functions in libvulkan.so on OpenBSD

This commit is contained in:
robert 2021-09-04 06:11:45 +00:00
parent d0c396467d
commit f3593cd0ef
2 changed files with 25 additions and 1 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.582 2021/09/01 16:54:37 robert Exp $
# $OpenBSD: Makefile,v 1.583 2021/09/04 06:11:45 robert Exp $
BROKEN-powerpc64 = Check failed: false. OS architecture not handled. (powerpc64)
BROKEN-i386 = ../../third_party/angle/src/libANGLE/validationEGL.h:137:12: error: reference to type 'const egl::AttributeMap' could not bind to an lvalue of type 'const long *'
@ -15,6 +15,7 @@ DPB_PROPERTIES= parallel parallel2
COMMENT= Chromium browser
V= 93.0.4577.63
REVISION= 0
DISTNAME= chromium-${V}

View File

@ -0,0 +1,23 @@
$OpenBSD: patch-third_party_vulkan-deps_vulkan-loader_src_loader_loader_c,v 1.1 2021/09/04 06:11:45 robert Exp $
Index: third_party/vulkan-deps/vulkan-loader/src/loader/loader.c
--- third_party/vulkan-deps/vulkan-loader/src/loader/loader.c.orig
+++ third_party/vulkan-deps/vulkan-loader/src/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(__linux__) || defined(__APPLE__) || defined(__Fuchsia__) || defined(__QNXNTO__) || defined(__OpenBSD__)
static inline bool IsHighIntegrity() {
return geteuid() != getuid() || getegid() != getgid();
@@ -267,7 +267,7 @@ static inline char *loader_getenv(const char *name, co
}
static inline char *loader_secure_getenv(const char *name, const struct loader_instance *inst) {
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__OpenBSD__)
// 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.