-
Notifications
You must be signed in to change notification settings - Fork 290
Description
Describe the bug
When trying to compile tcpreplay (https://github.com/appneta/tcpreplay/releases/tag/v4.3.3) from source using android ndk crosscompiling the build fails with:
sendpacket.c:977:5: fatal error: use of undeclared identifier 'mtu'
mtu = ifr.ifr_ifru.ifru_mtu;
^
To Reproduce
Steps to reproduce the behavior:
- using android-ndk-r21d on Ubuntu 19 x64 to build for aarch64-linux-android
./configure --host=aarch64-linux-android --with-libpcap=/path/to/libpcap/- make
Expected behavior
build runs successful
System (please complete the following information):
- OS: Ubuntu 19 x64 Linux vm 5.3.0-61-generic
- Tcpreplay Version releases/tag/v4.3.3
sourced env vars
export NDK=path/to/toolchains/android-ndk-r21d
export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/linux-x86_64
export TARGET=aarch64-linux-android
export API=21
export AR=$TOOLCHAIN/bin/$TARGET-ar
export AS=$TOOLCHAIN/bin/$TARGET-as
export CC=$TOOLCHAIN/bin/$TARGET$API-clang
export CXX=$TOOLCHAIN/bin/$TARGET$API-clang++
export LD=$TOOLCHAIN/bin/$TARGET-ld
export RANLIB=$TOOLCHAIN/bin/$TARGET-ranlib
export STRIP=$TOOLCHAIN/bin/$TARGET-strip