/* Set file descriptor of socket to non-blocking state  */
int nl_socket_set_nonblocking(struct nl_sock *sk)
/* Set file descriptor of socket to non-blocking state  */
int nl_socket_set_nonblocking(struct nl_sock *sk)
{
	if (sk->s_fd == -1)
		return -NLE_BAD_SOCK;
	if (fcntl(sk->s_fd, F_SETFL, O_NONBLOCK) < 0)
		return -nl_syserr2nlerr(errno);
	return 0;
}