简体   繁体   中英

fd_set not recognized in Eclipse

I'm working in Eclipse on an assignment involving a server and clients communicating via sockets. I'm trying to use the accept system call, which uses the fd_set struct. The problem is Eclipse indicates that the type fd_set is unresolved.

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 ?

According to http://linux.die.net/man/3/fd_set , #include <sys/select.h> . Hopefully that will do the trick.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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