Skip to content

[BUG] sendpacket.c:977:5: fatal error: use of undeclared identifier 'mtu' #612

@tandreb

Description

@tandreb

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:

  1. using android-ndk-r21d on Ubuntu 19 x64 to build for aarch64-linux-android
  2. ./configure --host=aarch64-linux-android --with-libpcap=/path/to/libpcap/
  3. 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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions