简体   繁体   English

Eclipse无法识别fd_set

[英]fd_set not recognized in Eclipse

I'm working in Eclipse on an assignment involving a server and clients communicating via sockets. 我正在Eclipse中进行一项工作,该工作涉及服务器和客户机通过套接字进行通信。 I'm trying to use the accept system call, which uses the fd_set struct. 我正在尝试使用accept系统调用,该系统调用使用了fd_set结构。 The problem is Eclipse indicates that the type fd_set is unresolved. 问题是Eclipse指示未解析类型fd_set

Here is a list of my imports: 这是我的进口货清单:

#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>

Why is Eclipse indicating fd_set is not recognized ? 为什么Eclipse指示无法识别fd_set

According to http://linux.die.net/man/3/fd_set , #include <sys/select.h> . 根据http://linux.die.net/man/3/fd_set,#include #include <sys/select.h> Hopefully that will do the trick. 希望能解决这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM