]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Android: Compile hs20-osu-client to /vendor/bin in test builds
authorChenming Huang <quic_chenhuan@quicinc.com>
Sun, 10 Apr 2022 01:02:08 +0000 (09:02 +0800)
committerJouni Malinen <j@w1.fi>
Thu, 14 Apr 2022 14:10:03 +0000 (17:10 +0300)
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

index 03d18c5e6c8cd867b6caf7ddd2623475f9898371..bb8326cba8050587beaf0c0615d2f4b5b0ac4d8b 100644 (file)
@@ -7,4 +7,9 @@ ifneq ($(filter VER_0_8_X VER_2_1_DEVEL,$(WPA_SUPPLICANT_VERSION)),)
 # set up in the other Android.mk.
 include $(S_LOCAL_PATH)/hostapd/Android.mk \
         $(S_LOCAL_PATH)/wpa_supplicant/Android.mk
+ifneq ($(TARGET_BUILD_VARIANT), user)
+ifeq ($(shell test $(PLATFORM_VERSION_LAST_STABLE) -ge 8 ; echo $$?), 0)
+include $(S_LOCAL_PATH)/hs20/client/Android.mk
+endif #End of Check for platform version
+endif #End of Check for target build variant
 endif
index e4db32208d506ba668a6da48002acc1e20bdfb95..8d208b25901b0d8ffdcc35a160218212687094e1 100644 (file)
@@ -60,6 +60,10 @@ L_CFLAGS += -DEAP_TLS_OPENSSL
 
 L_CFLAGS += -Wno-unused-parameter
 
+ifeq ($(shell test $(PLATFORM_VERSION_LAST_STABLE) -ge 8 ; echo $$?), 0)
+L_CFLAGS += -DCONFIG_ANDROID_LOG
+L_CFLAGS += -DANDROID_LOG_NAME='"hs20-osu-client"'
+endif
 
 ########################
 include $(CLEAR_VARS)
@@ -68,9 +72,15 @@ LOCAL_MODULE_TAGS := optional
 
 LOCAL_SHARED_LIBRARIES := libc libcutils
 LOCAL_SHARED_LIBRARIES += libcrypto libssl
+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 # End of check for platform version
 LOCAL_SHARED_LIBRARIES += libcurl
 
 LOCAL_CFLAGS := $(L_CFLAGS)