0002-gltrace-Avoid-__libc_dlsym-and-__libc_dlopen_mode-on-GLIBC-2-34.patch 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. From d28a980802ad48568c87da02d630c8babfe163bb Mon Sep 17 00:00:00 2001
  2. From: Jose Fonseca <jfonseca@vmware.com>
  3. Date: Wed, 1 Sep 2021 16:34:54 +0100
  4. Subject: [PATCH] gltrace: Avoid __libc_dlsym and __libc_dlopen_mode on GLIBC
  5. 2.34.
  6. These GLIBC_PRIVATE symbols are gone from GLIBC 2.34 due to the merge of
  7. libdl.so onto libc.so.
  8. This means apitrace can't defend against infinite recursion when
  9. used with Steam Overlay, but at least it should work otherwise.
  10. Fixes https://github.com/apitrace/apitrace/issues/756
  11. [Retrieved from:
  12. https://github.com/apitrace/apitrace/commit/d28a980802ad48568c87da02d630c8babfe163bb]
  13. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  14. ---
  15. wrappers/dlsym.cpp | 2 +-
  16. 1 file changed, 1 insertion(+), 1 deletion(-)
  17. diff --git a/wrappers/dlsym.cpp b/wrappers/dlsym.cpp
  18. index 5ab8465b0..5369af35a 100644
  19. --- a/wrappers/dlsym.cpp
  20. +++ b/wrappers/dlsym.cpp
  21. @@ -34,7 +34,7 @@
  22. #include "os.hpp"
  23. -#if defined(__GLIBC__) && !defined(__UCLIBC__)
  24. +#if defined(__GLIBC__) && !defined(__UCLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ < 34
  25. #include <dlfcn.h>