summary refs log tree commit diff
path: root/pkgs/tools/networking/bwm-ng/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools/networking/bwm-ng/default.nix')
-rw-r--r--pkgs/tools/networking/bwm-ng/default.nix28
1 files changed, 27 insertions, 1 deletions
diff --git a/pkgs/tools/networking/bwm-ng/default.nix b/pkgs/tools/networking/bwm-ng/default.nix
index cfcd051f281..128ebc155b5 100644
--- a/pkgs/tools/networking/bwm-ng/default.nix
+++ b/pkgs/tools/networking/bwm-ng/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, ncurses }:
+{ writeText, stdenv, fetchurl, ncurses }:
 
 let
   version = "0.6.1";
@@ -13,6 +13,32 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ ncurses ];
 
+  # gcc7 has some issues with inline functions
+  patches = [
+    (writeText "gcc7.patch"
+    ''
+    --- a/src/bwm-ng.c
+    +++ b/src/bwm-ng.c
+    @@ -27,5 +27,5 @@
+     /* handle interrupt signal */
+     void sigint(int sig) FUNCATTR_NORETURN;
+    -inline void init(void);
+    +static inline void init(void);
+     
+     /* clear stuff and exit */
+    --- a/src/options.c
+    +++ b/src/options.c
+    @@ -35,5 +35,5 @@
+     inline int str2output_type(char *optarg);
+     #endif
+    -inline int str2out_method(char *optarg);
+    +static inline int str2out_method(char *optarg);
+     inline int str2in_method(char *optarg);
+
+    '')
+  ];
+
+
   # This code uses inline in the gnu89 sense: see http://clang.llvm.org/compatibility.html#inline
   NIX_CFLAGS_COMPILE = if stdenv.cc.isClang then "-std=gnu89" else null;