openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/libnl/1_3.4.0-r0/libnl-3.4.0/lib/socket.c
int nl_socket_set_nonblocking(const struct nl_sock* sk)
{
    if (sk->s_fd == -1)
        return -NLE_BAD_SOCK;

    if (fcntl(sk->s_fd, F_SETFL, O_NONBLOCK) < 0)
    {
        NL_DBG(4,
               "nl_socket_set_nonblocking(%p): fcntl() failed with %d (%s)\n",
               sk, errno, nl_strerror_l(errno));
        return -nl_syserr2nlerr(errno);
    }

    return 0;
}
/**
 * Set file descriptor of socket to non-blocking state
 * @arg sk		Netlink socket.
 *
 * @return 0 on success or a negative error code.
 */
Set file descriptor of socket to non-blocking state
@arg sk              Netlink socket.

@return 0 on success or a negative error code.
Set file descriptor of socket to non - blocking state @arg sk Netlink socket . @return 0 on success or a negative error code .
int nl_socket_set_nonblocking(const struct nl_sock* sk)
{
    if (sk->s_fd == -1)
        return -NLE_BAD_SOCK;
    if (fcntl(sk->s_fd, F_SETFL, O_NONBLOCK) < 0)
    {
        NL_DBG(4,
               "nl_socket_set_nonblocking(%p): fcntl() failed with %d (%s)\n",
               sk, errno, nl_strerror_l(errno));
        return -nl_syserr2nlerr(errno);
    }
    return 0;
}
int nl_socket_set_nonblocking ( const struct nl_sock * sk ) { if ( sk -> s_fd == -1 ) return - NLE_BAD_SOCK ; if ( fcntl ( sk -> s_fd , F_SETFL , O_NONBLOCK ) < 0 ) { NL_DBG ( 4 , " \n " , sk , errno , nl_strerror_l ( errno ) ) ; return - nl_syserr2nlerr ( errno ) ; } return 0 ; }
Set file descriptor of socket to non-blocking state
 @arg sk              Netlink socket.
Set file descriptor of socket to non - blocking state @arg sk Netlink socket .