Unverified Commit b1b0a084 authored by Silvan Mosberger's avatar Silvan Mosberger Committed by GitHub
Browse files

Merge pull request #269845 from seirl/fix_psutil_darwin

psutils: fix build on darwin by setting -std=c89
parents 3c49f77e ff7534f1
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -9,9 +9,14 @@ stdenv.mkDerivation rec {
    hash = "sha256-OFPreVhLqPvieoFUJbZan38Vsljg1DoFqFa9t11YiuQ=";
  };

  postPatch = ''
    sed -i 's/void main/int main/' *.c
  '';

  configurePhase = ''
    sed -e 's,/usr/local/bin/perl,${perl}/bin/perl,' \
      -e "s,/usr/local,$out," \
      -e "s,CFLAGS =,CFLAGS = -std=c89," \
      Makefile.unix > Makefile
  '';