Skip to content

Commit

Permalink
apitrace: fix build w/glibc-2.34
Browse files Browse the repository at this point in the history
  • Loading branch information
Ma27 committed Feb 27, 2022
1 parent 65f5fdb commit 84635a6
Showing 2 changed files with 19 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkgs/applications/graphics/apitrace/default.nix
Original file line number Diff line number Diff line change
@@ -11,6 +11,12 @@ stdenv.mkDerivation rec {
owner = "apitrace";
};

patches = [
# glibc 2.34 compat
# derived from https://github.com/apitrace/apitrace/commit/d28a980802ad48568c87da02d630c8babfe163bb
./glibc-2.34-compat.patch
];

# LD_PRELOAD wrappers need to be statically linked to work against all kinds
# of games -- so it's fine to use e.g. bundled snappy.
buildInputs = [ libX11 procps python2 libdwarf qtbase qtwebkit ];
13 changes: 13 additions & 0 deletions pkgs/applications/graphics/apitrace/glibc-2.34-compat.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/wrappers/dlsym.cpp b/wrappers/dlsym.cpp
index 2eda082..0c0c8ee 100644
--- a/wrappers/dlsym.cpp
+++ b/wrappers/dlsym.cpp
@@ -34,7 +34,7 @@
#include "os.hpp"


-#ifdef __GLIBC__
+#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ < 34


#include <dlfcn.h>

0 comments on commit 84635a6

Please sign in to comment.