mirror of
https://github.com/libretro/RetroArch
synced 2025-03-24 22:43:41 +00:00
Attempted buildfix for net_socket
This commit is contained in:
parent
4c3482faab
commit
17d31e6dff
@ -69,8 +69,8 @@ bool socket_set_block(int fd, bool block);
|
|||||||
/* TODO: all callers should be converted to socket_set_block() */
|
/* TODO: all callers should be converted to socket_set_block() */
|
||||||
bool socket_nonblock(int fd);
|
bool socket_nonblock(int fd);
|
||||||
|
|
||||||
int socket_select(int nfds, fd_set *readfs, fd_set *writefds,
|
int socket_select(int nfds, void *readfs, void *writefds,
|
||||||
fd_set *errorfds, struct timeval *timeout);
|
void *errorfds, struct timeval *timeout);
|
||||||
|
|
||||||
bool socket_send_all_blocking(int fd, const void *data_, size_t size, bool no_signal);
|
bool socket_send_all_blocking(int fd, const void *data_, size_t size, bool no_signal);
|
||||||
|
|
||||||
|
@ -216,17 +216,20 @@ int socket_close(int fd)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int socket_select(int nfds, fd_set *readfs, fd_set *writefds,
|
int socket_select(int nfds, void *_readfs, void *_writefds,
|
||||||
fd_set *errorfds, struct timeval *timeout)
|
void *_errorfds, struct timeval *timeout)
|
||||||
{
|
{
|
||||||
#if !defined(__PSL1GHT__) && defined(__PS3__)
|
#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);
|
return socketselect(nfds, readfs, writefds, errorfds, timeout);
|
||||||
#elif defined(VITA)
|
#elif defined(VITA)
|
||||||
extern int retro_epoll_fd;
|
extern int retro_epoll_fd;
|
||||||
SceNetEpollEvent ev = {0};
|
SceNetEpollEvent ev = {0};
|
||||||
|
|
||||||
ev.events = SCE_NET_EPOLLIN | SCE_NET_EPOLLHUP;
|
ev.events = SCE_NET_EPOLLIN | SCE_NET_EPOLLHUP;
|
||||||
ev.data.fd = nfds;
|
ev.data.fd = nfds;
|
||||||
|
|
||||||
if((sceNetEpollControl(retro_epoll_fd, SCE_NET_EPOLL_CTL_ADD, nfds, &ev)))
|
if((sceNetEpollControl(retro_epoll_fd, SCE_NET_EPOLL_CTL_ADD, nfds, &ev)))
|
||||||
{
|
{
|
||||||
@ -236,6 +239,9 @@ int socket_select(int nfds, fd_set *readfs, fd_set *writefds,
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
#else
|
#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);
|
return select(nfds, readfs, writefds, errorfds, timeout);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user