Skip to content

Commit

Permalink
mempool: fix build error on aarch64
Browse files Browse the repository at this point in the history
Fix the following error when building on aarch64:

../modules/infra/control/mempool.c: In function ‘gr_pktmbuf_pool_get’:
../modules/infra/control/mempool.c:87:17: error: implicit declaration
                of function ‘qsort’ [-Wimplicit-function-declaration]
   87 |                 qsort(mt, MAX_MEMPOOL_PER_NUMA, sizeof(*mt), mt_sort);
      |                 ^~~~~

Add the missing include of stdlib.h

Fixes: 189ae9d ("infra: add wrapper to create mempools")
Signed-off-by: Robin Jarry <[email protected]>
  • Loading branch information
rjarry committed Jan 9, 2025
1 parent 527be9d commit 6d5dc65
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/infra/control/mempool.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#include <gr_mbuf.h>
#include <gr_mempool.h>

#include <stdlib.h>

struct mempool_tracker {
struct rte_mempool *mp;
uint32_t reserved;
Expand Down

0 comments on commit 6d5dc65

Please sign in to comment.