Merge pull request #24665 from peterhoeg/f/pmc

pmccabe: darwin is supported too
Fixes #24636.
This commit is contained in:
Peter Hoeg 2017-04-06 17:11:38 +08:00 committed by GitHub
commit 0af3de05ae
2 changed files with 20 additions and 1 deletions

View file

@ -9,6 +9,10 @@ stdenv.mkDerivation rec {
sha256 = "0a3h1b9fb87c82d5fbql5lc4gp338pa5s9i66dhw7zk8jdygx474";
};
patches = [
./getopt_on_darwin.patch
];
configurePhase = ''
sed -i -r Makefile \
-e 's,/usr/,/,g' \
@ -38,7 +42,7 @@ stdenv.mkDerivation rec {
trees or files; and vifn, to invoke vi given a function name rather
than a file name.
'';
platforms = platforms.linux;
maintainers = with maintainers; [ peterhoeg ];
platforms = platforms.unix;
};
}

View file

@ -0,0 +1,15 @@
diff --git a/decomment.c b/decomment.c
index 400707a..aea29fd 100644
--- a/decomment.c
+++ b/decomment.c
@@ -11,6 +11,10 @@
#include "getopt.h"
#endif
+#ifdef __APPLE__
+#include "getopt.h"
+#endif
+
#ifdef NEED_OPTIND
extern int optind;
#endif