diff --git a/srcpkgs/fzf/patches/0001-Portable-implementation-of-swapOutput.patch b/srcpkgs/fzf/patches/0001-Portable-implementation-of-swapOutput.patch new file mode 100644 index 00000000000..9caa25883c9 --- /dev/null +++ b/srcpkgs/fzf/patches/0001-Portable-implementation-of-swapOutput.patch @@ -0,0 +1,39 @@ +From 5073ddcd87868dfbaab7a8b2f2eff4cb509662a9 Mon Sep 17 00:00:00 2001 +From: Dominik Honnef +Date: Sat, 6 Jun 2015 23:25:03 +0200 +Subject: [PATCH] Portable implementation of swapOutput + +Assigning to stdin, stdout and stderr is not portable. They're specified +to be macros, and for example musl will not allow such code to be +compiled. + +Use dup2 instead. +--- + src/curses/curses.go | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/src/curses/curses.go b/src/curses/curses.go +index 985dd87..1cfc2c9 100644 +--- src/curses/curses.go ++++ src/curses/curses.go +@@ -1,13 +1,14 @@ + package curses + + /* ++#include + #include + #include + #cgo LDFLAGS: -lncurses + void swapOutput() { +- FILE* temp = stdout; +- stdout = stderr; +- stderr = temp; ++ dup2(2, 3); ++ dup2(1, 2); ++ dup2(3, 1); + } + */ + import "C" +-- +2.3.6 + diff --git a/srcpkgs/fzf/template b/srcpkgs/fzf/template index 15fda278d25..dc50b7a39f8 100644 --- a/srcpkgs/fzf/template +++ b/srcpkgs/fzf/template @@ -1,7 +1,7 @@ # Template file for 'fzf' pkgname=fzf version=0.9.13 -revision=1 +revision=2 _version=${version} wrksrc=${pkgname}-${_version} build_style=go