Tuesday, September 27, 2011

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

Everybody and their mom has own modified Reachability code and none are compatible. Yet another fix to the "default" code, in case you see this kind of warning or error (no-warnings policy):
Reachability.h: error: declaration of 'struct sockaddr_in' will not be visible outside of this function [-Werror,3]
Fix is easy, just add this:
#import <netinet/in.h>
Hope Apple would pull together all "fixes" and update the Reachability master version for all of us.

4 comments: