diff --git a/lib/isc/unix/socket.c b/lib/isc/unix/socket.c index b232625770..6d7908e282 100644 --- a/lib/isc/unix/socket.c +++ b/lib/isc/unix/socket.c @@ -130,10 +130,20 @@ typedef isc_event_t intev_t; #define TIMESTAMP_SPACE 0 #endif +/* + * Check to see if we have even basic support for cracking messages from + * the control data returned from/sent via recvmsg()/sendmsg(). + */ +#if defined(USE_CMSG) && (!defined(CMSG_LEN) || !defined(CMSG_SPACE)) +#undef USE_CMSG +#endif + /* * Total cmsg space needed for all of the above bits. */ +#ifdef USE_CMSG #define TOTAL_SPACE (PKTINFO_SPACE + TIMESTAMP_SPACE) +#endif struct isc_socket { /* Not locked. */