Quick Fix for LLVM Compiler Reachability Warnings

If you are using Apple’s LLVM compiler and their Reachability.h file you may be getting warnings like this:

Reachability.h: warning: Semantic Issue: Declaration of ‘struct sockaddr_in’ will not be visible outside of this function

Luckily, there is a quick way to fix this. Simply add this import line to the includes section of the Reachability.h file:

#import <netinet/in.h>

Bam! Warnings gone.

Show your support

Clapping shows how much you appreciated Andrew Theis’s story.