Merge "Build camera with the proper arcs."
diff --git a/guest/commands/usbforward/Android.mk b/guest/commands/usbforward/Android.mk
index db65f85..c8d219d 100644
--- a/guest/commands/usbforward/Android.mk
+++ b/guest/commands/usbforward/Android.mk
@@ -25,6 +25,9 @@
     device/google/cuttlefish_common \
     device/google/cuttlefish_kernel
 
+LOCAL_HEADER_LIBRARIES := \
+    libcutils_headers
+
 LOCAL_SHARED_LIBRARIES := \
     cuttlefish_auto_resources \
     libcuttlefish_fs \
diff --git a/guest/frontend/vnc_server/Android.mk b/guest/frontend/vnc_server/Android.mk
index 6f62250..cf6fc7d 100644
--- a/guest/frontend/vnc_server/Android.mk
+++ b/guest/frontend/vnc_server/Android.mk
@@ -64,7 +64,6 @@
     libvsocframebuffer
 
 LOCAL_STATIC_LIBRARIES := \
-    liblog \
     libjsoncpp
 
 include $(BUILD_EXECUTABLE)
diff --git a/guest/hals/audio/Android.mk b/guest/hals/audio/Android.mk
index 035c7d3..7991395 100644
--- a/guest/hals/audio/Android.mk
+++ b/guest/hals/audio/Android.mk
@@ -31,6 +31,9 @@
     libcuttlefish_fs \
     cuttlefish_time
 
+LOCAL_HEADER_LIBRARIES := \
+    libhardware_headers
+
 LOCAL_SRC_FILES := \
     audio_hal.cpp \
     vsoc_audio.cpp \
diff --git a/guest/hals/gps/Android.mk b/guest/hals/gps/Android.mk
index 46c2d30..1829c2f 100644
--- a/guest/hals/gps/Android.mk
+++ b/guest/hals/gps/Android.mk
@@ -31,6 +31,9 @@
 LOCAL_MODULE := gps.vsoc
 LOCAL_C_INCLUDES := device/google/cuttlefish_common
 
+LOCAL_HEADER_LIBRARIES := \
+    libhardware_headers
+
 LOCAL_CFLAGS := \
     -Wall -Werror -Wno-missing-field-initializers \
     -DLOG_TAG=\"VSoCGPS\" \
diff --git a/guest/hals/gps/gps_thread.cpp b/guest/hals/gps/gps_thread.cpp
index c745d45..4f00728 100644
--- a/guest/hals/gps/gps_thread.cpp
+++ b/guest/hals/gps/gps_thread.cpp
@@ -21,6 +21,7 @@
 #include <pthread.h>
 #include <sys/epoll.h>
 #include <time.h>
+#include <unistd.h>
 
 #include <cutils/log.h>
 #include <cutils/sockets.h>
diff --git a/guest/hals/gps/gps_vsoc.cpp b/guest/hals/gps/gps_vsoc.cpp
index fde0e12..6a70943 100644
--- a/guest/hals/gps/gps_vsoc.cpp
+++ b/guest/hals/gps/gps_vsoc.cpp
@@ -23,6 +23,7 @@
 #include <errno.h>
 #include <pthread.h>
 #include <stdint.h>
+#include <unistd.h>
 
 #include <cutils/log.h>
 #include <cutils/sockets.h>
diff --git a/guest/hals/gralloc/legacy/Android.mk b/guest/hals/gralloc/legacy/Android.mk
index 96ac256..030ca35 100644
--- a/guest/hals/gralloc/legacy/Android.mk
+++ b/guest/hals/gralloc/legacy/Android.mk
@@ -36,6 +36,10 @@
 
 LOCAL_CFLAGS := $(VSOC_GRALLOC_COMMON_CFLAGS)
 LOCAL_C_INCLUDES := device/google/cuttlefish_common
+
+LOCAL_HEADER_LIBRARIES := \
+    libhardware_headers
+
 LOCAL_SHARED_LIBRARIES := \
     liblog \
     libutils \
diff --git a/guest/hals/lights/Android.mk b/guest/hals/lights/Android.mk
index f5e2082..6add0f2 100644
--- a/guest/hals/lights/Android.mk
+++ b/guest/hals/lights/Android.mk
@@ -26,6 +26,7 @@
 LOCAL_MODULE_TAGS := optional
 
 LOCAL_C_INCLUDES := device/google/cuttlefish_common
+LOCAL_HEADER_LIBRARIES := libhardware_headers
 LOCAL_SHARED_LIBRARIES := liblog libcutils
 LOCAL_SRC_FILES := lights_vsoc.c
 LOCAL_MODULE := lights.vsoc
diff --git a/guest/hals/power/Android.mk b/guest/hals/power/Android.mk
index 3a7cfdb..d5ead05 100644
--- a/guest/hals/power/Android.mk
+++ b/guest/hals/power/Android.mk
@@ -29,6 +29,7 @@
 endif
 LOCAL_MULTILIB := first
 
+LOCAL_HEADER_LIBRARIES := libhardware_headers libutils_headers
 LOCAL_SHARED_LIBRARIES := liblog libcutils
 LOCAL_SRC_FILES := power.c
 LOCAL_MODULE := power.vsoc
diff --git a/guest/hals/sensors/Android.mk b/guest/hals/sensors/Android.mk
index ff2d4f1..8dd8a52 100644
--- a/guest/hals/sensors/Android.mk
+++ b/guest/hals/sensors/Android.mk
@@ -33,6 +33,9 @@
     liblog \
     libcutils
 
+LOCAL_HEADER_LIBRARIES := \
+    libhardware_headers
+
 LOCAL_SRC_FILES := \
     sensors.cpp \
     sensors_hal.cpp \
diff --git a/guest/libs/legacy_framebuffer/Android.mk b/guest/libs/legacy_framebuffer/Android.mk
index 22723de..672879d 100644
--- a/guest/libs/legacy_framebuffer/Android.mk
+++ b/guest/libs/legacy_framebuffer/Android.mk
@@ -41,6 +41,9 @@
 LOCAL_STATIC_LIBRARIES := \
     libjsoncpp
 
+LOCAL_HEADER_LIBRARIES := \
+    libhardware_headers
+
 LOCAL_SHARED_LIBRARIES := \
     libbase \
     liblog \
diff --git a/guest/libs/wpa_supplicant_8_lib/Android.mk b/guest/libs/wpa_supplicant_8_lib/Android.mk
index eba81f4..95b9662 100644
--- a/guest/libs/wpa_supplicant_8_lib/Android.mk
+++ b/guest/libs/wpa_supplicant_8_lib/Android.mk
@@ -61,6 +61,7 @@
 
 include $(CLEAR_VARS)
 LOCAL_MODULE := lib_driver_cmd_simulated
+LOCAL_VENDOR_MODULE := true
 LOCAL_SHARED_LIBRARIES := libc libcutils
 
 LOCAL_CFLAGS := $(L_CFLAGS) \
diff --git a/guest/libs/wpa_supplicant_8_lib/driver_cmd_nl80211.h b/guest/libs/wpa_supplicant_8_lib/driver_cmd_nl80211.h
index 5d2046e..5d0b366 100644
--- a/guest/libs/wpa_supplicant_8_lib/driver_cmd_nl80211.h
+++ b/guest/libs/wpa_supplicant_8_lib/driver_cmd_nl80211.h
@@ -25,10 +25,6 @@
 #include "linux_ioctl.h"
 #include "wpa_supplicant_i.h"
 
-#define LOG_TAG "VSoCWpaSupplicant8Driver"
-
-#include "cutils/log.h"
-
 #define VSOC_WPA_SUPPLICANT_DEBUG 0
 
 #if VSOC_WPA_SUPPLICANT_DEBUG