2010-04-21 19:08:43 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Arping < Formula
|
2010-11-10 18:16:28 +00:00
|
|
|
homepage 'https://github.com/ThomasHabets/arping'
|
2012-02-13 03:55:14 +00:00
|
|
|
url 'https://github.com/ThomasHabets/arping/tarball/arping-2.09'
|
2010-04-21 19:08:43 +00:00
|
|
|
md5 '8a10b23655ffbe93667691fb881afbf4'
|
|
|
|
|
|
|
|
depends_on 'libnet'
|
|
|
|
|
2010-04-07 05:58:35 +00:00
|
|
|
def patches
|
|
|
|
# Patch removes header conflict with libpcap; arping 2.x uses libnet
|
|
|
|
DATA
|
|
|
|
end
|
|
|
|
|
2010-04-21 19:08:43 +00:00
|
|
|
def install
|
2012-02-13 03:55:14 +00:00
|
|
|
system "./configure", "--disable-debug",
|
|
|
|
"--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}"
|
2010-04-21 19:08:43 +00:00
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
__END__
|
|
|
|
diff --git a/src/arping.c b/src/arping.c
|
|
|
|
index 7b5e43e..b80e4d8 100644
|
|
|
|
--- a/src/arping.c
|
|
|
|
+++ b/src/arping.c
|
|
|
|
@@ -78,12 +78,14 @@
|
|
|
|
#if HAVE_WIN32_LIBNET_H
|
|
|
|
#include <win32/libnet.h>
|
|
|
|
#endif
|
|
|
|
-#include <pcap.h>
|
|
|
|
|
|
|
|
#if HAVE_NET_BPF_H
|
|
|
|
#include <net/bpf.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
+#define PCAP_DONT_INCLUDE_PCAP_BPF_H
|
|
|
|
+#include <pcap.h>
|
|
|
|
+
|
|
|
|
#ifndef ETH_ALEN
|
|
|
|
#define ETH_ALEN 6
|
|
|
|
#endif
|
|
|
|
|