diff options
Diffstat (limited to 'recipes-extended/vpp-core/vpp-core/0001-getcpu-rename-getcpu-to-avoid-conflict-with-glibc-2..patch')
-rw-r--r-- | recipes-extended/vpp-core/vpp-core/0001-getcpu-rename-getcpu-to-avoid-conflict-with-glibc-2..patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/recipes-extended/vpp-core/vpp-core/0001-getcpu-rename-getcpu-to-avoid-conflict-with-glibc-2..patch b/recipes-extended/vpp-core/vpp-core/0001-getcpu-rename-getcpu-to-avoid-conflict-with-glibc-2..patch new file mode 100644 index 00000000..7f80b75f --- /dev/null +++ b/recipes-extended/vpp-core/vpp-core/0001-getcpu-rename-getcpu-to-avoid-conflict-with-glibc-2..patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From 205ebcd8eed1347330e7ebda616970d880bb03d7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Chunrong Guo <chunrong.guo@nxp.com> | ||
3 | Date: Tue, 9 Jul 2019 10:36:27 +0200 | ||
4 | Subject: [PATCH] getcpu:rename getcpu to avoid conflict with glibc >= 2.29 | ||
5 | |||
6 | Upstream-Status: Inappropriate [embedded specific] | ||
7 | |||
8 | Signed-off-by: C.r. Guo <nxa13725@lsv07004.swis.us-cdc01.nxp.com> | ||
9 | --- | ||
10 | src/vppinfra/linux/syscall.h | 2 +- | ||
11 | src/vppinfra/pmalloc.c | 2 +- | ||
12 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
13 | |||
14 | diff --git a/src/vppinfra/linux/syscall.h b/src/vppinfra/linux/syscall.h | ||
15 | index 1ae029d..fa65a47 100644 | ||
16 | --- a/src/vppinfra/linux/syscall.h | ||
17 | +++ b/src/vppinfra/linux/syscall.h | ||
18 | @@ -20,7 +20,7 @@ | ||
19 | #include <sys/syscall.h> | ||
20 | |||
21 | static inline int | ||
22 | -getcpu (unsigned *cpu, unsigned *node, void *tcache) | ||
23 | +getcpu0 (unsigned *cpu, unsigned *node, void *tcache) | ||
24 | { | ||
25 | return syscall (__NR_getcpu, cpu, node, tcache); | ||
26 | } | ||
27 | diff --git a/src/vppinfra/pmalloc.c b/src/vppinfra/pmalloc.c | ||
28 | index 365ee04..7dbca86 100644 | ||
29 | --- a/src/vppinfra/pmalloc.c | ||
30 | +++ b/src/vppinfra/pmalloc.c | ||
31 | @@ -53,7 +53,7 @@ pmalloc_validate_numa_node (u32 * numa_node) | ||
32 | if (*numa_node == CLIB_PMALLOC_NUMA_LOCAL) | ||
33 | { | ||
34 | u32 cpu; | ||
35 | - if (getcpu (&cpu, numa_node, 0) != 0) | ||
36 | + if (getcpu0 (&cpu, numa_node, 0) != 0) | ||
37 | return 1; | ||
38 | } | ||
39 | return 0; | ||
40 | -- | ||
41 | 2.7.4 | ||
42 | |||