Skip to content
15 changes: 11 additions & 4 deletions .azure/templates/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,16 @@ steps:
prefix_path="${BUILD_SOURCESDIRECTORY}/build-sharedlibs/install:${prefix_path}"
crosscompiling="-DCMAKE_CROSSCOMPILING=1 -DCMAKE_SYSTEM_NAME=${AGENT_OS}"
fi
androidparams=
if [[ "${ANDROID:-off}" == "on" ]] ; then
androidparams="-DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake -DANDROID_ABI=${ARCH} -DANDROID_PLATFORM=${ANDROID_PLATFORM} -DANDROID_NDK=$ANDROID_NDK"
fi
cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \
-DCMAKE_INSTALL_PREFIX=install \
-DCMAKE_PREFIX_PATH="${prefix_path//:/;}" \
-DBUILD_SHARED_LIBS=${SHAREDLIBS:-on} \
${crosscompiling} \
${androidparams} \
-DANALYZER=${ANALYZER:-off} \
-DSANITIZER=${SANITIZER:-none} \
-DENABLE_SSL=${SSL:-on} \
Expand All @@ -154,10 +159,11 @@ steps:
-DENABLE_TOPIC_DISCOVERY=${TOPIC_DISCOVERY:-on} \
-DENABLE_COVERAGE=${COVERAGE:-off} \
-DENABLE_ICEORYX=${ICEORYX:-off} \
-DBUILD_DDSPERF=on \
-DBUILD_TESTING=${TESTING:-on} \
-DBUILD_IDLC=${IDLC:-on} \
-DBUILD_IDLC_XTESTS=${IDLC_XTESTS:-on} \
-DBUILD_EXAMPLES=on \
-DBUILD_EXAMPLES=${EXAMPLES:-on} \
-DBUILD_DDSPERF=${DDSPERF:-on} \
-DWERROR=on \
${GENERATOR:+-G} "${GENERATOR}" -A "${PLATFORM}" -T "${TOOLSET}" ..
${SCAN_BUILD} cmake --build . --config ${BUILD_TYPE} --target install -- ${BUILD_TOOL_OPTIONS}
Expand All @@ -177,6 +183,7 @@ steps:
${SHELL} ../src/tools/ddsperf/sanity.bash
name: sanity_ddsperf
displayName: Sanity check ddsperf
condition: eq(variables['android'], 'off')
- bash: |
set -e -x
cd build
Expand All @@ -191,7 +198,7 @@ steps:
${GENERATOR:+-G} "${GENERATOR}" -A "${PLATFORM}" -T "${TOOLSET}" "${INSTALLPREFIX}/share/CycloneDDS/examples/helloworld"
cmake --build . --config ${BUILD_TYPE} -- ${BUILD_TOOL_OPTIONS}
${SHELL} ../../scripts/sanity_helloworld.bash
condition: ne(variables['sharedlibs'], 'off')
condition: and(ne(variables['sharedlibs'], 'off'), eq(variables['android'], 'off'))
name: sanity_hello_world
displayName: Sanity check Hello World
- bash: |
Expand All @@ -203,7 +210,7 @@ steps:
test -e $d/symbol_export_test
[[ "${BUILD_TYPE}" == 'Release' ]] || [[ "${AGENT_OS}" == 'Windows_NT' ]] || \
${SHELL} ../scripts/check_symbol_export.bash $d/symbol_export_test
condition: eq(variables['testing'], 'off')
condition: and(eq(variables['testing'], 'off'), eq(variables['android'], 'off'))
name: sanity_symbol_export
displayName: Sanity check export symbols
- bash: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ gen.*
.vs/
.vscode/
build/
build*/
*~
13 changes: 13 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,19 @@ jobs:
build_type: Release
sharedlibs: off
iceoryx: on
'Android 13 with API level 33 (Release, armv8)':
image: ubuntu-24.04
build_type: Release
sanitizer: undefined
testing: off
examples: off
idlc: off
idlc_xtests: off
android: on
android_platform: android-33
arch: arm64-v8a
ssl: off
ddsperf: off

steps:
- template: /.azure/templates/build-test.yml
Expand Down
4 changes: 3 additions & 1 deletion src/core/ddsi/src/ddsi_udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static void translate_pktinfo (struct ddsi_network_packet_info *pktinfo, ddsrt_m
pktinfo->dst.kind = DDSI_LOCATOR_KIND_UDPv6;
pktinfo->dst.port = port;
memcpy (pktinfo->dst.address, &pkt6->ipi6_addr, 16);
pktinfo->if_index = pkt6->ipi6_ifindex;
pktinfo->if_index = (uint32_t)pkt6->ipi6_ifindex;
return;
}
}
Expand Down Expand Up @@ -751,6 +751,8 @@ static int joinleave_asm_mcgroup (ddsrt_socket_t socket, int join, const ddsi_lo
ipv6mreq.ipv6mr_multiaddr = mcip.a6.sin6_addr;
#if __ZEPHYR__
ipv6mreq.ipv6mr_ifindex = interf ? interf->if_index : 0;
#elif __ANDROID__
ipv6mreq.ipv6mr_interface = interf ? (int)interf->if_index : 0;
#else
ipv6mreq.ipv6mr_interface = interf ? interf->if_index : 0;
#endif
Expand Down
4 changes: 4 additions & 0 deletions src/ddsrt/src/ifaddrs/posix/ifaddrs.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,11 @@ static bool is_the_kernel_likely_lying_about_multicast (const ddsrt_ifaddrs_t *i
mcaddr.ipv6.sin6_port = bindaddr.ipv6.sin6_port;
memset (&ipv6mreq, 0, sizeof (ipv6mreq));
ipv6mreq.ipv6mr_multiaddr = mcaddr.ipv6.sin6_addr;
#ifdef __ANDROID__
ipv6mreq.ipv6mr_interface = (int)ifa->index;
#else
ipv6mreq.ipv6mr_interface = ifa->index;
#endif
if (setsockopt (sock, IPPROTO_IPV6, IPV6_JOIN_GROUP, &ipv6mreq, sizeof (ipv6mreq)) != 0 ||
setsockopt (sock, IPPROTO_IPV6, IPV6_MULTICAST_IF, &ifa->index, sizeof (ifa->index)) != 0 ||
setsockopt (sock, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, &hops, sizeof (hops)) != 0)
Expand Down