mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-12-26 09:08:25 +00:00
[simulator] avoid conflicts between winsock.h and sys/time.h
This commit is contained in:
@@ -11,10 +11,6 @@
|
||||
#ifndef __SYS_IOCTL_H__
|
||||
#define __SYS_IOCTL_H__
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <winsock.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -16,10 +16,6 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <winsock.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -37,7 +33,6 @@ extern "C" {
|
||||
|
||||
typedef long fd_mask;
|
||||
|
||||
#ifndef _WIN32
|
||||
#ifndef _SYS_TYPES_FD_SET /* Newlib 2.2.0 or lower version */
|
||||
#define NBBY 8 /* number of bits in a byte */
|
||||
#define NFDBITS (sizeof (fd_mask) * NBBY) /* bits per mask */
|
||||
@@ -57,7 +52,6 @@ typedef struct _types_fd_set {
|
||||
#endif /* _SYS_TYPES_FD_SET */
|
||||
|
||||
int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);
|
||||
#endif /* _WIN32 */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -17,8 +17,6 @@
|
||||
#include <stdint.h>
|
||||
#include <time.h>
|
||||
#ifdef _WIN32
|
||||
#include <winsock.h> /* for struct timeval */
|
||||
#include <corecrt.h> /* for __time64_t */
|
||||
typedef __time64_t time_t;
|
||||
#endif /* _WIN32 */
|
||||
|
||||
@@ -45,7 +43,7 @@ struct timezone
|
||||
int tz_dsttime; /* type of dst correction */
|
||||
};
|
||||
|
||||
#if !defined(_TIMEVAL_DEFINED) && !defined(_WIN32)
|
||||
#if !defined(_TIMEVAL_DEFINED)
|
||||
#define _TIMEVAL_DEFINED
|
||||
struct timeval
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user