summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorC Stout <cstout@google.com>2024-06-04 11:35:59 -0700
committerMarge Bot <emma+marge@anholt.net>2024-06-07 18:29:20 +0000
commitd39faf7f3d37f471c9b3bc587c1ebbe207f94d6b (patch)
tree736911fc67b6c0ce6c6ec7980a965da2fe9c6d69 /src/util
parent2a3f53bd3baac6b7f18575bbe205be53f086a63c (diff)
util: u_dl: add Fuchsia support
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> Reviewed-by: Eric Engestrom <eric@igalia.com> Acked-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29539>
Diffstat (limited to 'src/util')
-rw-r--r--src/util/u_dl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/util/u_dl.c b/src/util/u_dl.c
index 27d7b366160..46765056e65 100644
--- a/src/util/u_dl.c
+++ b/src/util/u_dl.c
@@ -29,7 +29,7 @@
#include "detect_os.h"
-#if DETECT_OS_POSIX
+#if DETECT_OS_POSIX_LITE
#include <dlfcn.h>
#endif
#if DETECT_OS_WINDOWS
@@ -43,7 +43,7 @@
struct util_dl_library *
util_dl_open(const char *filename)
{
-#if DETECT_OS_POSIX
+#if DETECT_OS_POSIX_LITE
return (struct util_dl_library *)dlopen(filename, RTLD_LAZY | RTLD_LOCAL);
#elif DETECT_OS_WINDOWS
return (struct util_dl_library *)LoadLibraryA(filename);
@@ -57,7 +57,7 @@ util_dl_proc
util_dl_get_proc_address(struct util_dl_library *library,
const char *procname)
{
-#if DETECT_OS_POSIX
+#if DETECT_OS_POSIX_LITE
return (util_dl_proc) pointer_to_func(dlsym((void *)library, procname));
#elif DETECT_OS_WINDOWS
return (util_dl_proc)GetProcAddress((HMODULE)library, procname);
@@ -70,7 +70,7 @@ util_dl_get_proc_address(struct util_dl_library *library,
void
util_dl_close(struct util_dl_library *library)
{
-#if DETECT_OS_POSIX
+#if DETECT_OS_POSIX_LITE
dlclose((void *)library);
#elif DETECT_OS_WINDOWS
FreeLibrary((HMODULE)library);
@@ -83,7 +83,7 @@ util_dl_close(struct util_dl_library *library)
const char *
util_dl_error(void)
{
-#if DETECT_OS_POSIX
+#if DETECT_OS_POSIX_LITE
return dlerror();
#elif DETECT_OS_WINDOWS
return "unknown error";