Skip to content

Commit

Permalink
pcap: Add compatibility with latest libcap versions in OpenBSD #163
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaian committed Dec 20, 2016
1 parent 8d5e638 commit da79118
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/capture.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,12 @@
#define _BSD_SOURCE 1
#endif

#if defined (__OpenBSD__)
/* Old versions of libpcap in OpenBSD use <net/bpf.h>
* which actually defines timestamps as bpf_timeval instead
* of simple timeval. This no longer happens in newest libpcap
* versions, where header packets have timestamps in timeval
* structs */
#if defined (__OpenBSD__) && defined(_NET_BPF_H_)
#define timeval bpf_timeval
#endif

Expand Down

0 comments on commit da79118

Please sign in to comment.