ports/security/arpCounterattack/files/patch-arpCounterattack.cpp
Piotr Kubaj 4321a218a2 security/arpCounterattack: fix build with GCC architectures
When building with GCC, sys/types.h needs to be included:
In file included from arpCounterattack.cpp:35:
/usr/include/net/bpf.h:49:9: error: 'u_int32_t' does not name a type; did you mean 'uint32_t'?
typedef u_int32_t bpf_u_int32;

^~~~~~~~~
uint32_t

Approved by:	linimon (mentor)
Differential Revision:	https://reviews.freebsd.org/D21091
2019-07-30 12:45:04 +00:00

27 lines
596 B
C++

--- arpCounterattack.cpp.orig 2019-03-13 08:10:31 UTC
+++ arpCounterattack.cpp
@@ -25,13 +25,15 @@
#include <fstream>
#include <iostream>
#include <queue>
-#include <tr1/unordered_map>
+#include <unordered_map>
#include <vector>
#ifdef __FreeBSD__
#include <sys/ioctl.h>
#endif
+#include <sys/types.h>
+#include <net/bpf.h>
#include <errno.h>
#include <pcap.h>
#include <signal.h>
@@ -47,7 +48,6 @@
#include "string.hpp"
using namespace std;
-using namespace tr1;
const string programName = "ARP Counterattack 1.2.0";
string pidFileName = "/var/run/arpCounterattack.pid";