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> --- 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 397a32db58..2f884d4b7f 100644 --- a/drivers/net/af_packet/rte_eth_af_packet.c +++ b/drivers/net/af_packet/rte_eth_af_packet.c @@ -108,7 +108,7 @@ RTE_LOG_REGISTER_DEFAULT(af_packet_logtype, NOTICE); #define PMD_LOG_ERRNO(level, fmt, args...) \ rte_log(RTE_LOG_ ## level, af_packet_logtype, \ - "%s(): " fmt ":%s\n", __func__, ##args, strerror(errno)) + "%s(): " fmt ":%s\n", __func__, ##args, rte_strerror(errno)) static uint16_t eth_af_packet_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts) -- 2.33.0