xref: /OK3568_Linux_fs/yocto/meta-openembedded/meta-networking/recipes-support/netperf/files/cpu_set.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1Subject: [PATCH] netperf: fix CPU_SETSIZE to build with eglibc
2
3Upstream-Status: Pending
4
5Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com>
6---
7 src/netlib.c |    7 ++++++-
8 1 files changed, 6 insertions(+), 1 deletions(-)
9
10diff --git a/src/netlib.c b/src/netlib.c
11index 206e002..e33aae6 100644
12--- a/src/netlib.c
13+++ b/src/netlib.c
14@@ -2265,7 +2265,12 @@ bind_to_specific_processor(int processor_affinity, int use_cpu_map)
15      fall-back on what we had before, which is to use just the size of
16      an unsigned long. raj 2006-09-14 */
17
18-#if defined(__CPU_SETSIZE)
19+#if defined(CPU_SETSIZE)
20+#define NETPERF_CPU_SETSIZE CPU_SETSIZE
21+#define NETPERF_CPU_SET(cpu, cpusetp)  CPU_SET(cpu, cpusetp)
22+#define NETPERF_CPU_ZERO(cpusetp)      CPU_ZERO (cpusetp)
23+  typedef cpu_set_t netperf_cpu_set_t;
24+#elif defined(__CPU_SETSIZE)
25 #define NETPERF_CPU_SETSIZE __CPU_SETSIZE
26 #if defined(__CPU_SET_S)
27 #define NETPERF_CPU_SET(cpu, cpusetp)  __CPU_SET_S(cpu, sizeof (cpu_set_t), cpusetp)
28--
291.7.1.1
30
31