[libc] fix undefined warning of rt_memset

This commit is contained in:
Meco Man 2023-12-28 14:26:19 +08:00
parent 10aa4b9da1
commit 045a49603e
1 changed files with 2 additions and 1 deletions

View File

@ -15,6 +15,7 @@
#include <rtconfig.h>
#include <sys/types.h>
#include <sys/time.h>
#include <string.h>
#ifdef __cplusplus
extern "C" {
@ -48,7 +49,7 @@ typedef struct _types_fd_set {
#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1L << ((n) % NFDBITS)))
#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1L << ((n) % NFDBITS)))
#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1L << ((n) % NFDBITS)))
#define FD_ZERO(p) rt_memset((void*)(p), 0, sizeof(*(p)))
#define FD_ZERO(p) memset((void*)(p), 0, sizeof(*(p)))
#endif /* _SYS_TYPES_FD_SET */
int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);