I'm trying to use
struct sockaddr_in sin;
but if i use this i get
Variable has incomplete type 'struct sockaddr_in'
and
Forward declaration of 'struct sockaddr_in'
like a mistake. I get an error when I use Xcode4. In Xcode3.2, it works. Does anyone know how to solve this error? My import
#import <sys/socket.h> #import <netinet/in.h> #import <netinet6/in6.h> #import <arpa/inet.h> #import <ifaddrs.h> #include <netdb.h> #import <SystemConfiguration/SCNetworkReachability.h>
source share