Loading libnl_2/socket.c +12 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include <errno.h> #include <unistd.h> #include <fcntl.h> #include <malloc.h> #include <sys/time.h> #include <sys/socket.h> Loading Loading @@ -139,3 +140,14 @@ struct nl_cb *nl_socket_get_cb(struct nl_sock *sk) { return nl_cb_get(sk->s_cb); } 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 -errno; return 0; } Loading
libnl_2/socket.c +12 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include <errno.h> #include <unistd.h> #include <fcntl.h> #include <malloc.h> #include <sys/time.h> #include <sys/socket.h> Loading Loading @@ -139,3 +140,14 @@ struct nl_cb *nl_socket_get_cb(struct nl_sock *sk) { return nl_cb_get(sk->s_cb); } 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 -errno; return 0; }