Various things:
* work around -Wnullability-completeness.
* use C++ casts in C++ and C casts in C.
* stop using attributes clang doesn't support (such as `warning`).
* remove duplicate definitions of XATTR_CREATE and XATTR_REPLACE.
Change-Id: I07649e46275b28a23ca477deea119fe843999533
Add missing declarations:
INET_ADDRSTRLEN
IN6_IS_ADDR_MC_NODELOCAL
IN6_IS_ADDR_MC_GLOBAL
It has been reported that these prevent compilation of the Boost libraries
with the NDK. The corresponding patch has already been performed under
development/ndk/platforms/android-3/include.
Change-Id: I4ac514973daf3c06a8ef5538d7df79142a98e562