{"id":385,"date":"2012-05-31T10:51:40","date_gmt":"2012-05-31T02:51:40","guid":{"rendered":"http:\/\/my.no-ip.info\/carlos\/blog\/?p=385"},"modified":"2014-06-26T09:20:52","modified_gmt":"2014-06-26T01:20:52","slug":"%e8%a7%a3%e6%b1%ba-llvm-compiles-reachability-h-warning-%e5%95%8f%e9%a1%8c","status":"publish","type":"post","link":"https:\/\/carlos.aboutmy.info\/blog\/?p=385","title":{"rendered":"\u89e3\u6c7a LLVM compiles Reachability.h warning \u554f\u984c"},"content":{"rendered":"<p>Apple \u63d0\u4f9b\u5f88\u591a sample code \u7d66\u958b\u767c\u8005\u4f5c\u70ba\u53c3\u8003\u4e4b\u7528\u3002\u5176\u4e2d\u6709\u4e00\u500b\u53eb Reachability\uff0c\u7528\u4f86\u6e2c\u8a66\u7576\u662f\u7528\u8005\u7684 internet \u9023\u7dda\uff0c\u4f46\u7528\u4e0a LLVM Compiler \u5f8c\uff0c\u6703\u51fa\u73fe\u4ee5\u4e0b warning:<\/p>\n<blockquote><p>Reachability.h: warning: Semantic Issue: Declaration of \u2018struct sockaddr_in\u2019 will not be visible outside of this function<\/p><\/blockquote>\n<p>\u5176\u5be6\u53ef\u4ee5\u5f88\u7c21\u55ae\u89e3\u6c7a\uff0c\u53ea\u9700\u5728 Reachability.h \u958b\u982d\u4e2d\uff0c\u52a0\u4e0b\u4ee5\u4e0b\u4e00\u53e5\uff1a<\/p>\n<blockquote><p>#import &lt;netinet\/in.h&gt;<\/p><\/blockquote>\n<p>\u5c31\u53ef\u89e3\u6c7a\u4e86 <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Apple \u63d0\u4f9b\u5f88\u591a sample code \u7d66\u958b\u767c\u8005\u4f5c\u70ba\u53c3\u8003\u4e4b\u7528\u3002\u5176\u4e2d\u6709\u4e00\u500b\u53eb Reachability\uff0c\u7528\u4f86\u6e2c\u8a66\u7576\u662f\u7528\u8005\u7684 internet \u9023\u7dda\uff0c\u4f46\u7528\u4e0a LLVM Compiler \u5f8c\uff0c\u6703\u51fa\u73fe\u4ee5\u4e0b warning: Reachability.h: warning: Semantic Issue: Declaration of \u2018struct sockaddr_in\u2019 will not be visible outside of this function \u5176\u5be6\u53ef\u4ee5\u5f88\u7c21\u55ae\u89e3\u6c7a\uff0c\u53ea\u9700\u5728 Reachability.h \u958b\u982d\u4e2d\uff0c\u52a0\u4e0b\u4ee5\u4e0b\u4e00\u53e5\uff1a #import &lt;netinet\/in.h&gt; \u5c31\u53ef\u89e3\u6c7a\u4e86<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[15],"tags":[],"_links":{"self":[{"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/385"}],"collection":[{"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=385"}],"version-history":[{"count":1,"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/385\/revisions"}],"predecessor-version":[{"id":435,"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/385\/revisions\/435"}],"wp:attachment":[{"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=385"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=385"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}