wput: fix patch

This commit is contained in:
FX Coudert 2019-10-21 18:18:45 +02:00
parent 3a8596486a
commit ef51a60086

View file

@ -17,7 +17,10 @@ class Wput < Formula
# The patch is to skip inclusion of malloc.h only on OSX. Upstream:
# https://sourceforge.net/p/wput/patches/22/
patch :DATA
patch do
url "https://raw.githubusercontent.com/Homebrew/formula-patches/85fa66a9/wput/0.6.2.patch"
sha256 "a3c47a12344b6f67a5120dd4f838172e2af04f4d97765cc35d22570bcf6ab727"
end
def install
system "./configure", "--disable-debug", "--disable-dependency-tracking",
@ -31,31 +34,3 @@ class Wput < Formula
system "#{bin}/wput", "--version"
end
end
__END__
diff --git a/src/memdbg.c b/src/memdbg.c
index 560bd7c..9e69eef 100644
--- a/src/memdbg.c
+++ b/src/memdbg.c
@@ -1,5 +1,7 @@
#include <stdio.h>
+#ifndef __APPLE__
#include <malloc.h>
+#endif
#include <fcntl.h>
#ifndef WIN32
#include <sys/socket.h>
diff --git a/src/socketlib.c b/src/socketlib.c
index ab77d2b..c728ed9 100644
--- a/src/socketlib.c
+++ b/src/socketlib.c
@@ -20,7 +20,9 @@
* It is meant to provide some library functions. The only required external depency
* the printip function that is provided in utils.c */
+#ifndef __APPLE__
#include <malloc.h>
+#endif
#include <string.h>
#include <fcntl.h>
#include <errno.h>