aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-extended/vpp-core/vpp-core/0001-getcpu-rename-getcpu-to-avoid-conflict-with-glibc-2..patch
blob: 7f80b75f8167dec65c12f8e3fb09987f47930811 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From 205ebcd8eed1347330e7ebda616970d880bb03d7 Mon Sep 17 00:00:00 2001
From: Chunrong Guo <chunrong.guo@nxp.com>
Date: Tue, 9 Jul 2019 10:36:27 +0200
Subject: [PATCH] getcpu:rename getcpu to avoid conflict with glibc >= 2.29

Upstream-Status: Inappropriate [embedded specific]

Signed-off-by: C.r. Guo <nxa13725@lsv07004.swis.us-cdc01.nxp.com>
---
 src/vppinfra/linux/syscall.h | 2 +-
 src/vppinfra/pmalloc.c       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/vppinfra/linux/syscall.h b/src/vppinfra/linux/syscall.h
index 1ae029d..fa65a47 100644
--- a/src/vppinfra/linux/syscall.h
+++ b/src/vppinfra/linux/syscall.h
@@ -20,7 +20,7 @@
 #include <sys/syscall.h>
 
 static inline int
-getcpu (unsigned *cpu, unsigned *node, void *tcache)
+getcpu0 (unsigned *cpu, unsigned *node, void *tcache)
 {
   return syscall (__NR_getcpu, cpu, node, tcache);
 }
diff --git a/src/vppinfra/pmalloc.c b/src/vppinfra/pmalloc.c
index 365ee04..7dbca86 100644
--- a/src/vppinfra/pmalloc.c
+++ b/src/vppinfra/pmalloc.c
@@ -53,7 +53,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 (getcpu0 (&cpu, numa_node, 0) != 0)
 	return 1;
     }
   return 0;
-- 
2.7.4