diff --git a/libretro-common/include/net/net_socket.h b/libretro-common/include/net/net_socket.h index 335bcd5121..c32a2d6504 100644 --- a/libretro-common/include/net/net_socket.h +++ b/libretro-common/include/net/net_socket.h @@ -69,8 +69,8 @@ bool socket_set_block(int fd, bool block); /* TODO: all callers should be converted to socket_set_block() */ bool socket_nonblock(int fd); -int socket_select(int nfds, void *readfs, void *writefds, - void *errorfds, struct timeval *timeout); +int socket_select(int nfds, fd_set *readfs, fd_set *writefds, + fd_set *errorfds, struct timeval *timeout); bool socket_send_all_blocking(int fd, const void *data_, size_t size, bool no_signal); diff --git a/libretro-common/net/net_socket.c b/libretro-common/net/net_socket.c index 2bd9749240..182edf2727 100644 --- a/libretro-common/net/net_socket.c +++ b/libretro-common/net/net_socket.c @@ -216,20 +216,17 @@ int socket_close(int fd) #endif } -int socket_select(int nfds, void *_readfs, void *_writefds, - void *_errorfds, struct timeval *timeout) +int socket_select(int nfds, fd_set *readfs, fd_set *writefds, + fd_set *errorfds, struct timeval *timeout) { #if !defined(__PSL1GHT__) && defined(__PS3__) - fd_set *readfs = (fd_set*)_readfs; - fd_set *writefds = (fd_set*)_writefds; - fd_set *errorfds = (fd_set*)_errorfds; return socketselect(nfds, readfs, writefds, errorfds, timeout); #elif defined(VITA) extern int retro_epoll_fd; SceNetEpollEvent ev = {0}; - ev.events = SCE_NET_EPOLLIN | SCE_NET_EPOLLHUP; - ev.data.fd = nfds; + ev.events = SCE_NET_EPOLLIN | SCE_NET_EPOLLHUP; + ev.data.fd = nfds; if((sceNetEpollControl(retro_epoll_fd, SCE_NET_EPOLL_CTL_ADD, nfds, &ev))) { @@ -239,9 +236,6 @@ int socket_select(int nfds, void *_readfs, void *_writefds, } return 0; #else - fd_set *readfs = (fd_set*)_readfs; - fd_set *writefds = (fd_set*)_writefds; - fd_set *errorfds = (fd_set*)_errorfds; return select(nfds, readfs, writefds, errorfds, timeout); #endif }