For some reason, Mac OS X has a that doesn't define IPV6_PKTINFO unless one of __APPLE_USE_RFC_2292 or __APPLE_USE_RFC_3542 is set. There is no default. We should #define __APPLE_USE_RFC_3542 before including if we want to get IPV6_PKTINFO on Mac OS X. This is with Xcode 7.2 on Mac OS 10.10.5.