From: Mingwei Shi Date: Thu, 2 Nov 2017 05:59:23 +0000 (+0800) Subject: Correct the header file reference X-Git-Url: http://git.osdn.net/view?p=android-x86%2Fexternal-minigbm.git;a=commitdiff_plain;h=aaca49dcf71437a2eef1be8f686f65cc0a8836e3 Correct the header file reference 1. Add errno.h 2. Ensure everything is exported to vendor/ Jira: None. Test: Build passes on Android. Signed-off-by: Mingwei Shi --- diff --git a/Android.mk b/Android.mk index d681fd4..0a93ef0 100644 --- a/Android.mk +++ b/Android.mk @@ -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 diff --git a/cros_gralloc/cros_gralloc_buffer.cc b/cros_gralloc/cros_gralloc_buffer.cc index fe9c01a..c1c8764 100644 --- a/cros_gralloc/cros_gralloc_buffer.cc +++ b/cros_gralloc/cros_gralloc_buffer.cc @@ -7,6 +7,7 @@ #include "cros_gralloc_buffer.h" #include +#include #include cros_gralloc_buffer::cros_gralloc_buffer(uint32_t id, struct bo *acquire_bo, diff --git a/cros_gralloc/cros_gralloc_helpers.cc b/cros_gralloc/cros_gralloc_helpers.cc index ca3cbd1..e068846 100644 --- a/cros_gralloc/cros_gralloc_helpers.cc +++ b/cros_gralloc/cros_gralloc_helpers.cc @@ -11,6 +11,8 @@ #include #include #include +#include +#include const char* drmFormat2Str(int drm_format) { diff --git a/cros_gralloc/cros_gralloc_helpers.h b/cros_gralloc/cros_gralloc_helpers.h index 30df1e3..5b145d4 100644 --- a/cros_gralloc/cros_gralloc_helpers.h +++ b/cros_gralloc/cros_gralloc_helpers.h @@ -12,7 +12,11 @@ #include "cros_gralloc_types.h" #include +#ifdef USE_VNDK +#include +#else #include +#endif constexpr uint32_t cros_gralloc_magic = 0xABCDDCBA; constexpr uint32_t handle_data_size = diff --git a/cros_gralloc/gralloc1/cros_gralloc1_module.h b/cros_gralloc/gralloc1/cros_gralloc1_module.h index ff510a4..9e670f9 100644 --- a/cros_gralloc/gralloc1/cros_gralloc1_module.h +++ b/cros_gralloc/gralloc1/cros_gralloc1_module.h @@ -23,6 +23,7 @@ #include #include +#include struct cros_gralloc_module;