xcode报错:Declaration of ‘struct sockaddr_in’ will not be visible outside of this function

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

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

解决办法很简单,Reachability.h中最前面添加头文件:#import <netinet/in.h>

发表评论

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据