summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoerg Thalheim <joerg@thalheim.io>2017-11-08 12:28:32 +0000
committerJoerg Thalheim <joerg@thalheim.io>2017-11-08 12:39:07 +0000
commit81154d929a071ecd1944e267e6b532e28fbc387a (patch)
tree6ddbf73898b3a0ad4983265c73b7728c8d87f361
parent26ac0de8be35625d00092637e6a3e6d28fb0567c (diff)
downloadnixpkgs-81154d929a071ecd1944e267e6b532e28fbc387a.tar
nixpkgs-81154d929a071ecd1944e267e6b532e28fbc387a.tar.gz
nixpkgs-81154d929a071ecd1944e267e6b532e28fbc387a.tar.bz2
nixpkgs-81154d929a071ecd1944e267e6b532e28fbc387a.tar.lz
nixpkgs-81154d929a071ecd1944e267e6b532e28fbc387a.tar.xz
nixpkgs-81154d929a071ecd1944e267e6b532e28fbc387a.tar.zst
nixpkgs-81154d929a071ecd1944e267e6b532e28fbc387a.zip
dbench: fix compilation with glibc 2.6
stdint is needed for intptr_t
-rw-r--r--pkgs/development/tools/misc/dbench/default.nix5
-rw-r--r--pkgs/development/tools/misc/dbench/fix-missing-stdint.patch10
2 files changed, 15 insertions, 0 deletions
diff --git a/pkgs/development/tools/misc/dbench/default.nix b/pkgs/development/tools/misc/dbench/default.nix
index a1c9c11d34d..a1c9e85a83a 100644
--- a/pkgs/development/tools/misc/dbench/default.nix
+++ b/pkgs/development/tools/misc/dbench/default.nix
@@ -11,6 +11,11 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ autoconf popt zlib ];
 
+  patches = [
+    # patch has been also sent upstream and might be included in future versions
+    ./fix-missing-stdint.patch
+  ];
+
   preConfigure = ''
     ./autogen.sh
     configureFlagsArray+=("--datadir=$out/share/dbench")
diff --git a/pkgs/development/tools/misc/dbench/fix-missing-stdint.patch b/pkgs/development/tools/misc/dbench/fix-missing-stdint.patch
new file mode 100644
index 00000000000..96cb28e9e55
--- /dev/null
+++ b/pkgs/development/tools/misc/dbench/fix-missing-stdint.patch
@@ -0,0 +1,10 @@
+--- dbench-65b1987.org/libnfs.c	2017-11-08 12:25:39.652147989 +0000
++++ dbench-65b1987/libnfs.c	2017-11-08 12:26:20.269897054 +0000
+@@ -23,6 +23,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <fcntl.h>
++#include <stdint.h>
+ 
+ #define discard_const(ptr) ((void *)((intptr_t)(ptr)))
+