3
0
Fork 0
forked from mirrors/nixpkgs

psutils: fix build on darwin by setting -std=c89

And void main -> int main
This commit is contained in:
Antoine Pietri 2023-11-25 11:00:57 +00:00 committed by Silvan Mosberger
parent edb9802bee
commit ff7534f13b

View file

@ -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
'';