Use HAVE_ANDROID_OS to conditionally include files on a device target.
diff --git a/libcore/luni/src/main/native/java_net_NetworkInterface.cpp b/libcore/luni/src/main/native/java_net_NetworkInterface.cpp
index 420c045..1a72710 100644
--- a/libcore/luni/src/main/native/java_net_NetworkInterface.cpp
+++ b/libcore/luni/src/main/native/java_net_NetworkInterface.cpp
@@ -30,7 +30,7 @@
 
 #include <net/if.h> // Note: Can't appear before <sys/socket.h> on OS X.
 
-#ifdef ANDROID
+#ifdef HAVE_ANDROID_OS
 #include "ifaddrs-android.h"
 #else
 #include <ifaddrs.h>