The function strerror() is insecure in a multi-thread environment. This patch uses rte_strerror() to replace it.
Cc: sta...@dpdk.org Signed-off-by: Dengdui Huang <huangdeng...@huawei.com> Acked-by: Chengwen Feng <fengcheng...@huawei.com> Acked-by: Morten Brørup <m...@smartsharesystems.com> --- drivers/net/af_packet/rte_eth_af_packet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c index bfd3bd1eb1..cb3be4f906 100644 --- a/drivers/net/af_packet/rte_eth_af_packet.c +++ b/drivers/net/af_packet/rte_eth_af_packet.c @@ -114,7 +114,7 @@ RTE_LOG_REGISTER_DEFAULT(af_packet_logtype, NOTICE); #define PMD_LOG_ERRNO(level, fmt, ...) \ RTE_LOG_LINE(level, AFPACKET, "%s(): " fmt ":%s", __func__, \ - ## __VA_ARGS__, strerror(errno)) + ## __VA_ARGS__, rte_strerror(errno)) static uint16_t eth_af_packet_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) -- 2.33.0