summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2016-02-08 00:39:17 +0000
committerRobin Gloster <mail@glob.in>2016-02-08 00:39:17 +0000
commite6345523f2de0b1b201f9b173171bf1a721e4528 (patch)
tree06b4b8b9ee674f18f876f9968503871db5b13aae /pkgs/tools
parentd13d46fea03a6b60cb9caf0c5ca2bde1355d9f87 (diff)
downloadnixlib-e6345523f2de0b1b201f9b173171bf1a721e4528.tar
nixlib-e6345523f2de0b1b201f9b173171bf1a721e4528.tar.gz
nixlib-e6345523f2de0b1b201f9b173171bf1a721e4528.tar.bz2
nixlib-e6345523f2de0b1b201f9b173171bf1a721e4528.tar.lz
nixlib-e6345523f2de0b1b201f9b173171bf1a721e4528.tar.xz
nixlib-e6345523f2de0b1b201f9b173171bf1a721e4528.tar.zst
nixlib-e6345523f2de0b1b201f9b173171bf1a721e4528.zip
john: add patch to build with gcc5
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/security/john/default.nix2
-rw-r--r--pkgs/tools/security/john/gcc5.patch14
2 files changed, 16 insertions, 0 deletions
diff --git a/pkgs/tools/security/john/default.nix b/pkgs/tools/security/john/default.nix
index 2e99208fe114..dfaa56f0c772 100644
--- a/pkgs/tools/security/john/default.nix
+++ b/pkgs/tools/security/john/default.nix
@@ -13,6 +13,8 @@ stdenv.mkDerivation rec {
     sha256 = "08q92sfdvkz47rx6qjn7qv57cmlpy7i7rgddapq5384mb413vjds";
   };
 
+  patches = [ ./gcc5.patch ];
+
   postPatch = ''
     sed -ri -e '
       s!^(#define\s+CFG_[A-Z]+_NAME\s+).*/!\1"'"$out"'/etc/john/!
diff --git a/pkgs/tools/security/john/gcc5.patch b/pkgs/tools/security/john/gcc5.patch
new file mode 100644
index 000000000000..73da83483f90
--- /dev/null
+++ b/pkgs/tools/security/john/gcc5.patch
@@ -0,0 +1,14 @@
+diff --git a/src/common.h b/src/common.h
+--- a/src/common.h
++++ b/src/common.h
+@@ -31,7 +31,9 @@ typedef unsigned long long ARCH_WORD_64;
+ #define is_aligned(PTR, CNT) ((((ARCH_WORD)(const void *)(PTR))&(CNT-1))==0)
+ 
+ #ifdef __GNUC__
+-#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) || defined(__INTEL_COMPILER)
++#if __GNUC__ >= 5
++#define MAYBE_INLINE __attribute__((gnu_inline)) inline
++#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) || defined(__INTEL_COMPILER)
+ #define MAYBE_INLINE __attribute__((always_inline)) inline
+ #elif __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
+ #define MAYBE_INLINE __attribute__((always_inline))