make this code compile in userspace on OSX
This commit is contained in:
parent
413c8aaa87
commit
d0f65d47ec
@ -85,8 +85,15 @@ __FBSDID("$FreeBSD$");
|
||||
#define ICMP(p) ((struct icmphdr *)(p))
|
||||
#define ICMP6(p) ((struct icmp6_hdr *)(p))
|
||||
|
||||
#ifdef __APPLE__
|
||||
#undef snprintf
|
||||
#define snprintf sprintf
|
||||
#define SNPARGS(buf, len) buf + len
|
||||
#define SNP(buf) buf
|
||||
#else /* !__APPLE__ */
|
||||
#define SNPARGS(buf, len) buf + len, sizeof(buf) > len ? sizeof(buf) - len : 0
|
||||
#define SNP(buf) buf, sizeof(buf)
|
||||
#endif /* !__APPLE__ */
|
||||
|
||||
#ifdef WITHOUT_BPF
|
||||
void
|
||||
|
Loading…
x
Reference in New Issue
Block a user