Skip to content

Commit

Permalink
fixup! posix_select: initial import of select() function
Browse files Browse the repository at this point in the history
C++ doesn't like the `restrict` qualifier
  • Loading branch information
miri64 committed Dec 17, 2019
1 parent d695fa6 commit 38cdba1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions sys/posix/include/sys/select.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ static inline void FD_ZERO(fd_set *fdsetp)
* @return number of members added to the file descriptor sets on success.
* @return -1 on error, `errno` is set to indicate the error.
*/
int select(int nfds, fd_set *restrict readfds, fd_set *restrict writefds,
fd_set *restrict errorfds, struct timeval *restrict timeout);
int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *errorfds,
struct timeval *timeout);

#ifdef __cplusplus
}
Expand Down
4 changes: 2 additions & 2 deletions sys/posix/select/posix_select.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ static inline void posix_socket_select(int fd)
}
#endif /* IS_USED(MODULE_POSIX_SOCKETS) */

int select(int nfds, fd_set *restrict readfds, fd_set *restrict writefds,
fd_set *restrict errorfds, struct timeval *restrict timeout)
int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *errorfds,
struct timeval *timeout)
{
fd_set ret_readfds;
xtimer_t timeout_timer;
Expand Down

0 comments on commit 38cdba1

Please sign in to comment.