Xcode 4.2 - declaration of '...' will not be visible outside of this function warning

IphoneIosXcode4Ios5

Iphone Problem Overview


I use Apple Reachability class from Apple Sample code Reachability

in Xcode 4.2 and new Apple 3.0 compiler I get warning in this class that

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

declaration of 'struct sockaddr_in' will not be visible outside of this function*

I am not good at classic C %) so I dont understand how I can fix this warning or may be I can ignore it at all.

Thx

Iphone Solutions


Solution 1 - Iphone

Add #import <netinet/in.h> in Reachability.h to get away with this

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionSergnskView Question on Stackoverflow
Solution 1 - IphoneSaurabhView Answer on Stackoverflow