Merge changes from topic 'multinetwork_vndk' into oc-dev

* changes:
  Allow vendor code to link to libandroid_net.
  Move libandroid_net from Android.mk to Android.bp.
This commit is contained in:
Lorenzo Colitti
2017-05-25 23:02:36 +00:00
committed by Android (Google) Code Review
4 changed files with 39 additions and 17 deletions

View File

@@ -19,3 +19,31 @@ ndk_library {
first_version: "9",
unversioned_until: "current",
}
cc_defaults {
name: "libandroid_defaults",
cflags: [
"-Wall",
"-Werror",
"-Wunused",
"-Wunreachable-code",
],
}
// Network library.
cc_library_shared {
name: "libandroid_net",
defaults: ["libandroid_defaults"],
srcs: ["net.c"],
shared_libs: ["libnetd_client"],
include_dirs: ["bionic/libc/dns/include"],
}
llndk_library {
name: "libandroid_net",
export_include_dirs: ["include"],
symbol_file: "libandroid_net.map.txt",
unversioned: true,
}

View File

@@ -58,20 +58,3 @@ LOCAL_MODULE := libandroid
LOCAL_CFLAGS += $(common_cflags)
include $(BUILD_SHARED_LIBRARY)
# Network library.
include $(CLEAR_VARS)
LOCAL_MODULE := libandroid_net
LOCAL_CFLAGS := $(common_cflags)
LOCAL_SRC_FILES:= \
net.c \
LOCAL_SHARED_LIBRARIES := \
libnetd_client \
LOCAL_C_INCLUDES += \
frameworks/base/native/include \
bionic/libc/dns/include \
system/netd/include \
include $(BUILD_SHARED_LIBRARY)

View File

@@ -0,0 +1 @@
../../../../native/include/android/multinetwork.h

View File

@@ -0,0 +1,10 @@
# These functions have been part of the NDK since API 24.
# They are also all available to vendor code.
LIBANDROID_NET {
global:
android_setsocknetwork; # vndk
android_setprocnetwork; # vndk
android_getaddrinfofornetwork; # vndk
local:
*;
};