apitrace: fix build w/glibc-2.34

Failing Hydra build: https://hydra.nixos.org/build/155150225
This commit is contained in:
Maximilian Bosch 2021-10-14 14:42:44 +02:00
parent 65f5fdb818
commit 84635a6e17
No known key found for this signature in database
GPG key ID: 091DBF4D1FC46B8E
2 changed files with 19 additions and 0 deletions

View file

@ -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 ];

View file

@ -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>