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.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.