diff options
author | Kerstin Humm <kerstin@erictapen.name> | 2021-11-11 05:35:34 +0100 |
---|---|---|
committer | Kerstin Humm <kerstin@erictapen.name> | 2021-11-11 05:55:32 +0100 |
commit | bb799694db5480bf2d0c56d27ede14dc491ad377 (patch) | |
tree | 110b698492c658b3e9122bc280a62759b4f2b963 /pkgs/development/libraries/libepoxy/libgl-path.patch | |
parent | 62b9b0d9e860b2223bb0d4a1fa1d06045197fe2d (diff) |
epoxy: rename to libepoxy
https://github.com/NixOS/nixpkgs/issues/145040
Diffstat (limited to 'pkgs/development/libraries/libepoxy/libgl-path.patch')
-rw-r--r-- | pkgs/development/libraries/libepoxy/libgl-path.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/pkgs/development/libraries/libepoxy/libgl-path.patch b/pkgs/development/libraries/libepoxy/libgl-path.patch new file mode 100644 index 0000000000000..8f38ee27174b6 --- /dev/null +++ b/pkgs/development/libraries/libepoxy/libgl-path.patch @@ -0,0 +1,24 @@ +diff --git a/src/dispatch_common.c b/src/dispatch_common.c +index b3e4f5f..303e8f5 100644 +--- a/src/dispatch_common.c ++++ b/src/dispatch_common.c +@@ -310,6 +310,19 @@ get_dlopen_handle(void **handle, const char *lib_name, bool exit_on_fail, bool l + flags |= RTLD_NOLOAD; + + *handle = dlopen(lib_name, flags); ++#ifdef LIBGL_PATH ++ if (!*handle) { ++ char pathbuf[sizeof(LIBGL_PATH) + 1 + 1024 + 1]; ++ int l = snprintf(pathbuf, sizeof(pathbuf), "%s/%s", LIBGL_PATH, lib_name); ++ if (l < 0 || l >= sizeof(pathbuf)) { ++ // This really shouldn't happen ++ fprintf(stderr, "Error prefixing library pathname\n"); ++ exit(1); ++ } ++ *handle = dlopen(pathbuf, flags); ++ } ++#endif ++ + if (!*handle) { + if (exit_on_fail) { + fprintf(stderr, "Couldn't open %s: %s\n", lib_name, dlerror()); |