More fun for Solaris: if promiscuous mode is not enabled, outgoing packets will not be captured. This apparently applies to versions of Solaris using the DLPI interface. Versions of Solaris post-11 apparently use the BPF interface just like everyone else. It also explains why (after spending more time than I'd like to admit debugging this even though I vaguely remember having to set promiscuous mode when testing on Solaris years ago) after resorting to building the latest libpcap on SmartOS, epcap error'ed out in pcap_activate() when attempting to do a BIOCGDLTLIST because, although looking like a Solaris 11 system and claiming to be one, SmartOS actually uses DLPI and not BPF for packet capture.
And this is why we can't have nice things, Solaris. Solaris still uses caddr_t (which is an alias for char*) for iov_base. Apparently this has been changed to void* in Solaris 11 but on the Solaris variant I am testing on (SmartOS, whose uname humourously reports itself as 5.11), the default for iov_base is caddr_t unless you ask for XPG4_2 which will include a whole world of pain when you just wanted to suppress a compiler warning without the evils of casting ... So the alternatives seem to be ifdef'ing the code where iov_base is set just for Solaris, adding a EPCAP_IOV_BASE macro where a cast to caddr_t is done just for Solaris or punishing everybody by muddying the code with a cast to void with all the oddities and potentials for undefined behaviour that entails but, hey, less typing!
While the man page for pcap suggests including pcap/pcap.h, some OS'es (OpenBSD) rely on pcap.h. /usr/include/pcap.h has this comment which suggests it can be relied upon to be present: For backwards compatibility. Note to OS vendors: do NOT get rid of this file! Many applications expect to be able to include <pcap.h>, and at least some of them go through contortions in their configure scripts to try to detect OSes that have "helpfully" moved pcap.h to <pcap/pcap.h> without leaving behind a <pcap.h> file.