Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame^] | 1 | Subject: [PATCH] netperf: fix CPU_SETSIZE to build with eglibc |
| 2 | |
| 3 | Upstream-Status: Pending |
| 4 | |
| 5 | Signed-off-by: Xin Ouyang <Xin.Ouyang@windriver.com> |
| 6 | --- |
| 7 | src/netlib.c | 7 ++++++- |
| 8 | 1 files changed, 6 insertions(+), 1 deletions(-) |
| 9 | |
| 10 | diff --git a/src/netlib.c b/src/netlib.c |
| 11 | index 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 | -- |
| 29 | 1.7.1.1 |
| 30 | |