]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Android: Compile hs20-osu-client to /vendor/bin in test builds
authorPurushottam Kushwaha <quic_pkushwah@quicinc.com>
Fri, 18 Jan 2019 12:48:33 +0000 (18:18 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 10 Mar 2022 17:40:08 +0000 (19:40 +0200)
hs20-osu-client compilation fails on Android O onwards because of
undefined reference for __android_log_print/__android_log_vprint.

Modify hs20-osu-client's Android.mk to include liblog library and use
tag 'hs20-osu-client' in logcat logs. Additionally, compile
hs20-osu-client to /vendor/bin in non-production builds.

Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
Android.mk
hs20/client/Android.mk
hs20/client/osu_client.c

index bd7a4097444b46a476096632536091bcd273e2af..33672269f569d2ebc663528cd0fc697a4bb1a132 100644 (file)
@@ -5,6 +5,14 @@ ifneq ($(filter VER_0_8_X VER_2_1_DEVEL,$(WPA_SUPPLICANT_VERSION)),)
 # TODO: Clean up the Android.mks, reset all the temporary variables at the
 # end of each Android.mk, so that one Android.mk doesn't depend on variables
 # set up in the other Android.mk.
+ifneq ($(TARGET_BUILD_VARIANT), user)
+ifeq ($(shell test $(PLATFORM_VERSION_LAST_STABLE) -ge 8 ; echo $$?), 0)
+include $(LOCAL_PATH)/hostapd/Android.mk \
+        $(LOCAL_PATH)/wpa_supplicant/Android.mk \
+        $(LOCAL_PATH)/hs20/client/Android.mk
+else
 include $(LOCAL_PATH)/hostapd/Android.mk \
         $(LOCAL_PATH)/wpa_supplicant/Android.mk
+endif #End of Check for platform version
+endif #End of Check for target build variant
 endif
index e4db32208d506ba668a6da48002acc1e20bdfb95..4d2e5d117f78a0bc6d79c12d85b8045eb93babc7 100644 (file)
@@ -60,6 +60,14 @@ L_CFLAGS += -DEAP_TLS_OPENSSL
 
 L_CFLAGS += -Wno-unused-parameter
 
+ifneq ($(TARGET_BUILD_VARIANT), user)
+ifeq ($(shell test $(PLATFORM_VERSION_LAST_STABLE) -ge 8 ; echo $$?), 0)
+L_CFLAGS += -DCONFIG_ANDROID_LOG
+L_CFLAGS += -DANDROID_LOG_NAME='"hs20-osu-client"'
+L_CFLAGS += -Wno-error-deprecated-declarations
+L_CFLAGS += -Wno-unused-variable
+endif
+endif
 
 ########################
 include $(CLEAR_VARS)
@@ -68,9 +76,17 @@ LOCAL_MODULE_TAGS := optional
 
 LOCAL_SHARED_LIBRARIES := libc libcutils
 LOCAL_SHARED_LIBRARIES += libcrypto libssl
+ifneq ($(TARGET_BUILD_VARIANT), user)
+ifeq ($(shell test $(PLATFORM_VERSION_LAST_STABLE) -ge 8 ; echo $$?), 0)
+LOCAL_VENDOR_MODULE := true
+LOCAL_SHARED_LIBRARIES += libxml2
+LOCAL_SHARED_LIBRARIES += liblog
+else
 #LOCAL_SHARED_LIBRARIES += libxml2
 LOCAL_STATIC_LIBRARIES += libxml2
 LOCAL_SHARED_LIBRARIES += libicuuc
+endif
+endif
 LOCAL_SHARED_LIBRARIES += libcurl
 
 LOCAL_CFLAGS := $(L_CFLAGS)
index 77b15403cbfbecaa8192d848ad38bef1d83dfeb2..bf78548a914ec62d0f8fe53f0a4f4dbac1b1951d 100644 (file)
@@ -10,7 +10,7 @@
 #include <time.h>
 #include <sys/stat.h>
 #ifdef ANDROID
-#include "private/android_filesystem_config.h"
+#include "cutils/android_filesystem_config.h"
 #endif /* ANDROID */
 
 #include "common.h"