Merge ~vicamo/libhybris/+git/libhybris:for-libhybris-maintainers/fix-wifi-h-not-found into ~libhybris-maintainers/libhybris/+git/libhybris:staging

Proposed by You-Sheng Yang
Status: Merged
Approved by: Simon Fels
Approved revision: 3e51715f5a6c129f793b327b764e5f12ef76f4ab
Merged at revision: 5bd465b6fec1fab40b57aa9b4c231bfeae9017f8
Proposed branch: ~vicamo/libhybris/+git/libhybris:for-libhybris-maintainers/fix-wifi-h-not-found
Merge into: ~libhybris-maintainers/libhybris/+git/libhybris:staging
Diff against target: 27 lines (+3/-3)
2 files modified
hybris/tests/test_wifi.c (+2/-2)
hybris/wifi/wifi.c (+1/-1)
Reviewer Review Type Date Requested Status
Simon Fels Pending
Review via email: mp+282554@code.launchpad.net

This proposal supersedes a proposal from 2015-12-15.

Description of the change

wifi: fix hardware_legacy/wifi.h not found

Android headers were supposed to be installed to /usr/include. When it's not the case, even with a correct C include path set for Android headers, the build still fails with "hardware_legacy/wifi.h not found".

This patch removes the redundant level of directory from wifi related include directives.

To post a comment you must log in.
Revision history for this message
You-Sheng Yang (vicamo) wrote : Posted in a previous version of this proposal

Actually prefixing a package name as namespace in the include directives is a safe policy that we should really enforce, but that takes several parties, pkg-config, down-stream projects to cooperate. This patch simply removes android/ as others do.

It should be fine for now to enforce such prefix policy in libhybris source code if that's what we decide to head to. And the decision here may affect the layout of android-headers package as well. See https://code.launchpad.net/~vicamo/android-headers/+git/android-headers/+merge/278111

Revision history for this message
Simon Fels (morphis) wrote : Posted in a previous version of this proposal

LGTM

review: Approve
Revision history for this message
You-Sheng Yang (vicamo) wrote :

Really want to land this to reduce differences between libhybris central and zhongshan's fork.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/hybris/tests/test_wifi.c b/hybris/tests/test_wifi.c
2index e37f992..71bb7fe 100644
3--- a/hybris/tests/test_wifi.c
4+++ b/hybris/tests/test_wifi.c
5@@ -17,8 +17,8 @@
6
7 #include <stdio.h>
8
9-#include <android/android-config.h>
10-#include <android/hardware_legacy/wifi.h>
11+#include <android-config.h>
12+#include <hardware_legacy/wifi.h>
13
14 #define COMMAND_LOAD_WIFI "1"
15 #define COMMAND_UNLOAD_WIFI "0"
16diff --git a/hybris/wifi/wifi.c b/hybris/wifi/wifi.c
17index 51bb255..cae41ed 100644
18--- a/hybris/wifi/wifi.c
19+++ b/hybris/wifi/wifi.c
20@@ -20,7 +20,7 @@
21 #include <stddef.h>
22
23 #include <hybris/common/binding.h>
24-#include <android/hardware_legacy/wifi.h>
25+#include <hardware_legacy/wifi.h>
26
27 #define COMPAT_LIBRARY_PATH "/system/lib/libhardware_legacy.so"
28

Subscribers

People subscribed via source and target branches