Merge pull request #35431 from xeji/bwm-ng

bwm-ng: fix build error with gcc7

authored by Jörg Thalheim and committed by GitHub cd550944 221510cf

+27 -1
+27 -1
pkgs/tools/networking/bwm-ng/default.nix
··· 1 - { stdenv, fetchurl, ncurses }: 1 + { writeText, stdenv, fetchurl, ncurses }: 2 2 3 3 let 4 4 version = "0.6.1"; ··· 12 12 }; 13 13 14 14 buildInputs = [ ncurses ]; 15 + 16 + # gcc7 has some issues with inline functions 17 + patches = [ 18 + (writeText "gcc7.patch" 19 + '' 20 + --- a/src/bwm-ng.c 21 + +++ b/src/bwm-ng.c 22 + @@ -27,5 +27,5 @@ 23 + /* handle interrupt signal */ 24 + void sigint(int sig) FUNCATTR_NORETURN; 25 + -inline void init(void); 26 + +static inline void init(void); 27 + 28 + /* clear stuff and exit */ 29 + --- a/src/options.c 30 + +++ b/src/options.c 31 + @@ -35,5 +35,5 @@ 32 + inline int str2output_type(char *optarg); 33 + #endif 34 + -inline int str2out_method(char *optarg); 35 + +static inline int str2out_method(char *optarg); 36 + inline int str2in_method(char *optarg); 37 + 38 + '') 39 + ]; 40 + 15 41 16 42 # This code uses inline in the gnu89 sense: see http://clang.llvm.org/compatibility.html#inline 17 43 NIX_CFLAGS_COMPILE = if stdenv.cc.isClang then "-std=gnu89" else null;