下载的一个 demo 程序,应该是没有问题的,然而导入了 VS2015 之后,编译始终报错
比如这样的代码:
#ifndef _WIN_POLL_H
#define _WIN_POLL_H
#define POLLIN 0x001
#define POLLPRI 0x002
#define POLLOUT 0x004
struct pollfd
{
int fd; // File Descriptor to poll
short int events; //Types of events poller takes care about
short int revents; //Types of events that actualy occured
};
#endif
编译之后 POLLIN POLLPRI POLLOUT struct pollfd 全都报宏重定义的错,并且我全局搜索也并没有搜索到有重定义的地方
有过经验的同学来告诉下咋回事?