eal: fix build
authorJerin Jacob <jerin.jacob@caviumnetworks.com>
Wed, 7 Nov 2018 06:59:06 +0000 (06:59 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 12 Nov 2018 12:27:02 +0000 (13:27 +0100)
commit5d08fecdd39f2373713a0475b75a4126800c9acf
treee2a0c88a5f34f98411144fb6e6d0c5d5cddf3fc7
parent3a6f2c50b9dc27a958af87d7ca9533b51a36477b
eal: fix build

Some toolchain has fls() definition in string.h as argument type int,
which is conflicting uint32_t argument type.

/export/dpdk.org/lib/librte_eal/common/rte_reciprocal.c:47:19:
error: conflicting types for ‘fls’
 static inline int fls(uint32_t x)
                  ^~~

/opt/marvell-tools-201/aarch64-marvell-elf/include/strings.h:59:6:
note: previous declaration of ‘fls’ was here
 int  fls(int) __pure2;

FreeBSD string.h also has fls() with argument as int type.
https://www.freebsd.org/cgi/man.cgi?query=fls&sektion=3

Fixing the conflict by using rte version of fls.

Fixes: ffe3ec811ef5 ("sched: introduce reciprocal divide")
Fixes: faf2b25c9f80 ("fm10k: support VMDQ in multi-queue configuration")
Cc: stable@dpdk.org
Suggested-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
drivers/net/fm10k/fm10k_ethdev.c
lib/librte_eal/common/rte_reciprocal.c