Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

fd_set not recognized in Eclipse

Tags:

c++

linux

sockets

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?

like image 375
trekkieyk Avatar asked Apr 22 '26 13:04

trekkieyk


1 Answers

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

like image 60
Lou Avatar answered Apr 25 '26 02:04

Lou



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!