eal: fix internal ABI tag with clang
authorBruce Richardson <bruce.richardson@intel.com>
Fri, 29 Jan 2021 16:48:16 +0000 (16:48 +0000)
committerDavid Marchand <david.marchand@redhat.com>
Fri, 29 Jan 2021 19:59:09 +0000 (20:59 +0100)
commit4ab63cd60ceb343db43da8ed060e45e165393dae
tree939ddfbb0f4923677cf49e89b0999aed9cc41738
parent3c2cca6a0da17c83716522084357731ab053172e
eal: fix internal ABI tag with clang

Clang does not have an "error" attribute for functions, so for marking
internal functions we need to check for the error attribute, and provide
a fallback if it is not present. For clang, we can use "diagnose_if"
attribute, similarly checking for its presence before use.

Fixes: fba5af82adc8 ("eal: add internal ABI tag definition")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
lib/librte_eal/include/rte_compat.h