Problem with FD_ZERO on raspberry pi

Problem solved. Don't use a variable with the same name as a typedef (fd_set)

Sorry bothering anyone.


I ran into a problem which on my rapsberry pi.
FD_ZERO somehow fails to compile.
On an ubuntu machine it is not a problem.
I have searched for this problem but could not find any hint.
Does anybody have any idea what the problem might be.

Kind regards,

pi@Raspie ~/omxd $ cat
#include <sys/types.h>
#include <sys/socket.h>
#include <stdlib.h>

using namespace std;

int main() {
fd_set master_set;
fd_set fd_set;
pi@Raspie ~/omxd $ make tst
g++ -O2 -Wall -std=c++0x -o tst In function ‘int main()’: error: ‘__arr’ was not declared in this scope error: ‘__arr’ was not declared in this scope
make: *** [tst] Error 1

Last edited on
#include <sys/select.h> 

But you should have it in sys/types.h. I'll double check later today.

EDIT: What OS are you running? If Linux, what disto?
Last edited on
Topic archived. No new replies allowed.