aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Nagel2013-09-20 13:51:35 -0500
committerJack Nagel2013-09-20 13:51:35 -0500
commit56fc970a1bab6c0bcbda914f7bdc2d10cfb79fe3 (patch)
treeec8b972f798df8a7263a611be93e80565f0e3f8d
parent2198bf1d22341cf9b85c52e692afbcb3e7f4ec62 (diff)
downloadhomebrew-56fc970a1bab6c0bcbda914f7bdc2d10cfb79fe3.tar.bz2
peervpn: inline patch
-rw-r--r--Library/Formula/peervpn.rb27
1 files changed, 24 insertions, 3 deletions
diff --git a/Library/Formula/peervpn.rb b/Library/Formula/peervpn.rb
index 91b6f2cb8..ad6893470 100644
--- a/Library/Formula/peervpn.rb
+++ b/Library/Formula/peervpn.rb
@@ -8,9 +8,7 @@ class Peervpn < Formula
depends_on "tuntap"
- def patches
- "https://raw.github.com/gist/4170462/6460aa7cd015cc2a5f4128c5b1952b912073f5cd/freevpn0.029__platform__io.patch"
- end if MacOS.version == :snow_leopard
+ def patches; DATA; end if MacOS.version == :snow_leopard
def install
system "make"
@@ -28,3 +26,26 @@ class Peervpn < Formula
system "#{bin}/peervpn"
end
end
+
+__END__
+diff --git a/platform/io.c b/platform/io.c
+index 209666a..0a6c2cf 100644
+--- a/platform/io.c
++++ b/platform/io.c
+@@ -24,6 +24,16 @@
+ #if defined(__FreeBSD__)
+ #define IO_BSD
+ #elif defined(__APPLE__)
++size_t strnlen(const char *s, size_t maxlen)
++{
++ size_t len;
++
++ for (len = 0; len < maxlen; len++, s++) {
++ if (!*s)
++ break;
++ }
++ return (len);
++}
+ #define IO_BSD
+ #define IO_USE_SELECT
+ #elif defined(WIN32)