Revert "Attempted buildfix for net_socket"

This reverts commit 17d31e6dfff93b30c697b6a67b1715707105b6e4.
This commit is contained in:
libretroadmin 2022-05-31 06:06:43 +02:00
parent 17d31e6dff
commit 4811f8d3f6
2 changed files with 6 additions and 12 deletions

View File

@ -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);

View File

@ -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
}