aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Nagel2013-12-12 14:00:36 -0600
committerJack Nagel2013-12-12 14:00:36 -0600
commit97ef699ecc8a6754f7f0d88fd3ac7ead09a5c13d (patch)
tree8d2e732f53d87aa8365e17ebe45eda819d2da540
parentea980d2a05a0c2a9afc058f720513b0bf913ee69 (diff)
downloadhomebrew-97ef699ecc8a6754f7f0d88fd3ac7ead09a5c13d.tar.bz2
hping: patch out strlcpy declaration
This project seems dead but the current fix is not ideal.
-rw-r--r--Library/Formula/hping.rb38
1 files changed, 26 insertions, 12 deletions
diff --git a/Library/Formula/hping.rb b/Library/Formula/hping.rb
index ee530beec..88a48f545 100644
--- a/Library/Formula/hping.rb
+++ b/Library/Formula/hping.rb
@@ -7,21 +7,20 @@ class Hping < Formula
version '3.20051105'
def patches
- {:p0 => [
- # MacPorts patches: http://trac.macports.org/browser/trunk/dports/net/hping3
- "https://trac.macports.org/export/70033/trunk/dports/net/hping3/files/patch-libpcap_stuff.c.diff",
- "https://trac.macports.org/export/70033/trunk/dports/net/hping3/files/patch-ars.c.diff",
- "https://trac.macports.org/export/70033/trunk/dports/net/hping3/files/patch-sendip.c.diff",
- "https://trac.macports.org/export/70033/trunk/dports/net/hping3/files/patch-Makefile.in.diff",
- "https://trac.macports.org/export/70033/trunk/dports/net/hping3/files/patch-bytesex.h.diff"
- ]}
+ {
+ :p0 => [
+ # MacPorts patches: http://trac.macports.org/browser/trunk/dports/net/hping3
+ "https://trac.macports.org/export/70033/trunk/dports/net/hping3/files/patch-libpcap_stuff.c.diff",
+ "https://trac.macports.org/export/70033/trunk/dports/net/hping3/files/patch-ars.c.diff",
+ "https://trac.macports.org/export/70033/trunk/dports/net/hping3/files/patch-sendip.c.diff",
+ "https://trac.macports.org/export/70033/trunk/dports/net/hping3/files/patch-Makefile.in.diff",
+ "https://trac.macports.org/export/70033/trunk/dports/net/hping3/files/patch-bytesex.h.diff",
+ ],
+ :p1 => DATA,
+ }
end
def install
- # Conflict with secure strcpy function. Applying suggested fix from macports.
- # http://trac.macports.org/ticket/40763#comment:2
- ENV.append 'CFLAGS', '-D_FORTIFY_SOURCE=0'
-
# Compile fails with tcl support; TCL on OS X is 32-bit only
system "./configure", "--no-tcl"
@@ -35,3 +34,18 @@ class Hping < Formula
"install"
end
end
+
+__END__
+diff --git a/gethostname.c b/gethostname.c
+index 3d0ea58..a8a9699 100644
+--- a/gethostname.c
++++ b/gethostname.c
+@@ -18,8 +18,6 @@
+ #include <arpa/inet.h>
+ #include <string.h>
+
+-size_t strlcpy(char *dst, const char *src, size_t siz);
+-
+ char *get_hostname(char* addr)
+ {
+ static char answer[1024];