From 1ee346a0a61b454a1ce879f97cb9c06267d1e107 Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Mon, 18 Mar 2019 17:06:51 +0100 Subject: Fix build with newer linux headers Change-Id: Ibfdcec60567ec357205fa137257f2d8cba44b01c Signed-off-by: Damjan Marion --- src/vppinfra/linux/syscall.h | 6 ++++-- src/vppinfra/pmalloc.c | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src/vppinfra') diff --git a/src/vppinfra/linux/syscall.h b/src/vppinfra/linux/syscall.h index 1ae029d5802..c07cad631bd 100644 --- a/src/vppinfra/linux/syscall.h +++ b/src/vppinfra/linux/syscall.h @@ -19,11 +19,13 @@ #include #include +#ifndef HAVE_GETCPU static inline int -getcpu (unsigned *cpu, unsigned *node, void *tcache) +getcpu (unsigned *cpu, unsigned *node) { - return syscall (__NR_getcpu, cpu, node, tcache); + return syscall (__NR_getcpu, cpu, node, 0); } +#endif static inline long set_mempolicy (int mode, const unsigned long *nodemask, unsigned long maxnode) diff --git a/src/vppinfra/pmalloc.c b/src/vppinfra/pmalloc.c index 9f908f40cc9..d9e50d15733 100644 --- a/src/vppinfra/pmalloc.c +++ b/src/vppinfra/pmalloc.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -53,7 +54,7 @@ pmalloc_validate_numa_node (u32 * numa_node) if (*numa_node == CLIB_PMALLOC_NUMA_LOCAL) { u32 cpu; - if (getcpu (&cpu, numa_node, 0) != 0) + if (getcpu (&cpu, numa_node) != 0) return 1; } return 0; -- cgit 1.2.3-korg