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