diff options
Diffstat (limited to 'slirp/libslirp.h')
-rw-r--r-- | slirp/libslirp.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/slirp/libslirp.h b/slirp/libslirp.h index 8117187..b0496d5 100644 --- a/slirp/libslirp.h +++ b/slirp/libslirp.h @@ -3,6 +3,8 @@ #include <qemu-common.h> +#ifdef CONFIG_SLIRP + void slirp_init(int restricted, struct in_addr vnetwork, struct in_addr vnetmask, struct in_addr vhost, const char *vhostname, const char *tftp_path, @@ -12,7 +14,8 @@ void slirp_init(int restricted, struct in_addr vnetwork, void slirp_select_fill(int *pnfds, fd_set *readfds, fd_set *writefds, fd_set *xfds); -void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds); +void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds, + int select_error); void slirp_input(const uint8_t *pkt, int pkt_len); @@ -32,4 +35,13 @@ void slirp_socket_recv(struct in_addr guest_addr, int guest_port, const uint8_t *buf, int size); size_t slirp_socket_can_recv(struct in_addr guest_addr, int guest_port); +#else /* !CONFIG_SLIRP */ + +static inline void slirp_select_fill(int *pnfds, fd_set *readfds, + fd_set *writefds, fd_set *xfds) { } + +static inline void slirp_select_poll(fd_set *readfds, fd_set *writefds, + fd_set *xfds, int select_error) { } +#endif /* !CONFIG_SLIRP */ + #endif |