在Eclipse中无法识别fd_set

tre*_*eyk 2 c++ sockets linux

我正在Eclipse中工作,涉及服务器和客户端通过套接字进行通信.我正在尝试使用accept系统调用,它使用fd_setstruct.问题是Eclipse表明该类型fd_set尚未解决.

这是我的进口清单:

#include <sys/types.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <arpa/inet.h>
#include <vector>
#include <iostream>
#include <errno.h>
#include <stdio.h>
#include <unistd.h>
Run Code Online (Sandbox Code Playgroud)

为什么Eclipse指示fd_set无法识别

Lou*_*Lou 5

根据http://linux.die.net/man/3/fd_set , #include <sys/select.h>. 希望这会成功.