struct connection {
#ifdef WIN32
WSADATA wsaData;
SOCKET socket1;
#else
int socket1;
#endif
struct sockaddr_in dest_addr;
struct hostent *hostentry;
char *ip;
int port;
int state;
};
That structure I use. In Windows I can compile my code fine but in Linux I get: error: defrencing point to incomplete type for this piece of code: conn->dest_addr.sin_addr = *( ( struct sockaddr_in * )conn->hostentry->h_addr_list[0] );
but it compile in window idea?