do {
l.sl_sd = socket( sai->ai_family, sai->ai_socktype, sai->ai_protocol);
if ( l.sl_sd == AC_SOCKET_INVALID ) {
+ int err = sock_errno();
Debug( LDAP_DEBUG_ANY,
"daemon: socket() failed errno=%d (%s)\n", err,
sock_errstr(err), 0 );
# ifdef LDAP_PF_UNIX
case AF_UNIX:
if ( chmod( (char *)sai->ai_addr, S_IRWXU ) < 0 ) {
- err = sock_errno();
+ int err = sock_errno();
Debug( LDAP_DEBUG_ANY, "daemon: fchmod(%ld) failed errno=%d (%s)",
(long) l.sl_sd, err, sock_errstr(err) );
tcp_close( l.sl_sd );