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

Proposed by You-Sheng Yang
Status: Superseded
Proposed branch: ~vicamo/libhybris/+git/libhybris:for-libhybris-maintainers/fix-wifi-h-not-found
Merge into: ~libhybris-maintainers/libhybris/+git/libhybris:master
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 Approve
Review via email: mp+280546@code.launchpad.net

This proposal has been superseded by a proposal from 2016-01-14.

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 :

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 :

LGTM

review: Approve

Unmerged commits

3e51715... by You-Sheng Yang

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.

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