Ifdef out nl_sock_fd to make users aware it is not used.
Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
#endif
}
+#ifndef _WIN32
/* Returns the underlying fd for 'sock', for use in "poll()"-like operations
* that can't use nl_sock_wait().
*
int
nl_sock_fd(const struct nl_sock *sock)
{
-#ifdef _WIN32
- BUILD_ASSERT_DECL(sizeof sock->handle == sizeof(int));
- return (int)sock->handle;
-#else
return sock->fd;
-#endif
}
+#endif
/* Returns the PID associated with this socket. */
uint32_t
int nl_sock_drain(struct nl_sock *);
void nl_sock_wait(const struct nl_sock *, short int events);
+#ifndef _WIN32
int nl_sock_fd(const struct nl_sock *);
+#endif
uint32_t nl_sock_pid(const struct nl_sock *);