Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Warning when using Reachability.h [duplicate]

When using Reachability.h — Apple's code to deal with connections on iOS:

+ (Reachability*) reachabilityWithAddress: (const struct sockaddr_in*) hostAddress;

I am getting the following warning:

Declaration of 'struct sockaddr_in' will not be visible outside of this function
like image 942
TheLearner Avatar asked May 03 '12 15:05

TheLearner


1 Answers

Add #import <netinet/in.h> in Reachability.h file and this warning will be gone.. :D

like image 138
Ankit Srivastava Avatar answered Sep 26 '22 18:09

Ankit Srivastava