apitrace: fix build w/glibc-2.34

Failing Hydra build: https://hydra.nixos.org/build/155150225
main
Maximilian Bosch 3 years ago
parent 65f5fdb818
commit 84635a6e17
No known key found for this signature in database
GPG Key ID: 091DBF4D1FC46B8E
  1. 6
      pkgs/applications/graphics/apitrace/default.nix
  2. 13
      pkgs/applications/graphics/apitrace/glibc-2.34-compat.patch

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

@ -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>
Loading…
Cancel
Save