[LEDE-DEV] [PATCH] libnl-tiny: Avoid re-defining ifmap

Felix Fietkau nbd at nbd.name
Mon Nov 14 00:32:56 PST 2016


On 2016-11-14 03:31, Florian Fainelli wrote:
> Guard the ifmap structure definition with __UAPI_DEF_IF_IFMAP to avoid
> build errors like these with newer kernels:
> 
> In file included from
> /home/florian/dev/openwrt/trunk/staging_dir/toolchain-arm_cortex-a8+vfpv3_gcc-6.2.0_glibc-2.24_eabi/include/linux/if_tunnel.h:5:0,
>                  from
> /home/florian/dev/openwrt/trunk/build_dir/target-arm_cortex-a8+vfpv3_glibc-2.24_eabi/netifd-2016-10-27/system-linux.c:37:
> /home/florian/dev/openwrt/trunk/staging_dir/target-arm_cortex-a8+vfpv3_glibc-2.24_eabi/usr/include/libnl-tiny/linux/if.h:119:8:
> error: redefinition of 'struct ifmap'
>  struct ifmap
>         ^~~~~
> In file included from
> /home/florian/dev/openwrt/trunk/build_dir/target-arm_cortex-a8+vfpv3_glibc-2.24_eabi/netifd-2016-10-27/system-linux.c:24:0:
> /home/florian/dev/openwrt/trunk/staging_dir/toolchain-arm_cortex-a8+vfpv3_gcc-6.2.0_glibc-2.24_eabi/include/net/if.h:111:8:
> note: originally defined here
>  struct ifmap
>         ^~~~~
> 
> Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
> ---
> Not clear what's the best way to fix this, resyncing against a newer kernel's if.h turned out
> to require pulling a lot more dependencies, like glibc-compat.h
> 
> This patch here is fairly non intrusive and works for the OpenWrt/LEDE kernels and a recent
> upstream kernel as well.
What about simply deleting src/include/linux entirely?

- Felix




More information about the Lede-dev mailing list