Make sure the error code is included in the message logged for
unexpected socket creation errors in order to facilitate troubleshooting
on Windows.
return (ISC_R_FAMILYNOSUPPORT);
default:
strerror_r(socket_errno, strbuf, sizeof(strbuf));
- UNEXPECTED_ERROR(__FILE__, __LINE__,
- "socket() failed: %s", strbuf);
+ UNEXPECTED_ERROR(
+ __FILE__, __LINE__,
+ "socket() failed with error code %lu: %s",
+ socket_errno, strbuf);
return (ISC_R_UNEXPECTED);
}
}