OSDN Git Service

Correct the header file reference
authorMingwei Shi <mingwei.shi@intel.com>
Thu, 2 Nov 2017 05:59:23 +0000 (13:59 +0800)
committerKalyan Kondapally <kalyan.kondapally@intel.com>
Wed, 8 Nov 2017 17:47:03 +0000 (09:47 -0800)
1. Add errno.h
2. Ensure everything is exported to vendor/

Jira: None.
Test: Build passes on Android.
Signed-off-by: Mingwei Shi <mingwei.shi@intel.com>
Android.mk
cros_gralloc/cros_gralloc_buffer.cc
cros_gralloc/cros_gralloc_helpers.cc
cros_gralloc/cros_gralloc_helpers.h
cros_gralloc/gralloc1/cros_gralloc1_module.h

index d681fd4..0a93ef0 100644 (file)
@@ -52,7 +52,12 @@ LOCAL_CFLAGS += -DDRV_I915
 LOCAL_SHARED_LIBRARIES += libdrm_intel
 endif
 
+ifeq ($(shell test $(PLATFORM_SDK_VERSION) -ge 27; echo $$?), 0)
 LOCAL_SHARED_LIBRARIES += libnativewindow
+LOCAL_STATIC_LIBRARIES += libarect
+LOCAL_HEADER_LIBRARIES += libnativebase_headers
+LOCAL_CFLAGS += -DUSE_VNDK
+endif
 
 LOCAL_MODULE := gralloc.$(TARGET_BOARD_PLATFORM)
 LOCAL_MODULE_TAGS := optional
index fe9c01a..c1c8764 100644 (file)
@@ -7,6 +7,7 @@
 #include "cros_gralloc_buffer.h"
 
 #include <assert.h>
+#include <errno.h>
 #include <sys/mman.h>
 
 cros_gralloc_buffer::cros_gralloc_buffer(uint32_t id, struct bo *acquire_bo,
index ca3cbd1..e068846 100644 (file)
@@ -11,6 +11,8 @@
 #include <cstdlib>
 #include <cutils/log.h>
 #include <sync/sync.h>
+#include <error.h>
+#include <unistd.h>
 
 const char* drmFormat2Str(int drm_format)
 {
index 30df1e3..5b145d4 100644 (file)
 #include "cros_gralloc_types.h"
 
 #include <system/graphics.h>
+#ifdef USE_VNDK
+#include <vndk/window.h>
+#else
 #include <system/window.h>
+#endif
 
 constexpr uint32_t cros_gralloc_magic = 0xABCDDCBA;
 constexpr uint32_t handle_data_size =
index ff510a4..9e670f9 100644 (file)
@@ -23,6 +23,7 @@
 
 #include <hardware/gralloc1.h>
 #include <utils/Log.h>
+#include <unistd.h>
 
 struct cros_gralloc_module;