android: c_compat: add __cmsg_nxthd() for Android KitKat 4.4
authorHauke Mehrtens <hauke.mehrtens@lantiq.com>
Thu, 15 Oct 2015 11:59:13 +0000 (13:59 +0200)
committerJon A. Cruz <jonc@osg.samsung.com>
Wed, 13 Jan 2016 07:38:01 +0000 (07:38 +0000)
commite25f986586c3e4bf25a98999810d803b4efbba1d
treefe4d635f516e0eb0cb811f27a5627d441ccb069e
parentdca59e1689fbcb2f4d3d30275cf27f4956a407a0
android: c_compat: add __cmsg_nxthd() for Android KitKat 4.4

The function __cmsg_nxthd() is missing in Android 4.4, but the Android NDK
header files in the version we are using are referencing it and we use it in
our code, this functions was added in version 5.0. To make IoTivity
dynamically loadable on Android KitKat 4.4 add this functions
as a weak symbol, so it will be used if the c lib does not provide it, like
on Android < 5.0 This code was taken from these two resources:
https://raw.githubusercontent.com/android/platform_bionic/master/libc/bionic/__cmsg_nxthdr.cpp
https://github.com/android/platform_bionic/commit/ff64831b0965c16c95c9f81a148f30a6ef3a6c64

Change-Id: I02ef763cf3f82c73b1e0169230dd8c7e9d6d379b
Signed-off-by: Hauke Mehrtens <hauke.mehrtens@lantiq.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/3895
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
build_common/android/compatibility/c_compat.c