Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation when macro HWC_DEVICE_API_VERSION_0_1 defined #20

Merged
merged 1 commit into from Jul 7, 2014

Conversation

energycsdx
Copy link
Contributor

compilation in previous android versions is broken by 3f20184

@morphis
Copy link
Contributor

morphis commented Jul 7, 2014

LGTM

sledges added a commit that referenced this pull request Jul 7, 2014
Fix compilation when macro HWC_DEVICE_API_VERSION_0_1 defined
@sledges sledges merged commit 0c61712 into mer-hybris:master Jul 7, 2014
@Tofee
Copy link
Contributor

Tofee commented Dec 28, 2016

Hello,
This commit breaks the build where HWC_DEVICE_API_VERSION_0_1 isn't defined and where the corresponding types are absent from android headers. Indeed, hwcomposer_backend_v0.h uses some of them, like "hwc_composer_device_t", so this header should not be parsed at all.
I'll try to find some time to prepare a PR, but in the meantime my proposal is to have the following patch:

 diff --git a/hwcomposer/hwcomposer_backend_v0.cpp b/hwcomposer/hwcomposer_backend_v0.cpp
index d40a6b3..6eed37c 100644
--- a/hwcomposer/hwcomposer_backend_v0.cpp
+++ b/hwcomposer/hwcomposer_backend_v0.cpp
@@ -40,8 +40,9 @@
 ****************************************************************************/
 #include <android-version.h>
 #if ANDROID_VERSION_MAJOR <= 4
-#include "hwcomposer_backend_v0.h"
+#include <hardware/hwcomposer_defs.h>
 #ifdef HWC_DEVICE_API_VERSION_0_1
+#include "hwcomposer_backend_v0.h"
 
 
 HwComposerBackend_v0::HwComposerBackend_v0(hw_module_t *hwc_module, hw_device_t *hw_device)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants