From 373385fc9160bfe060e77ba83f62c6301b7ad756 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Mon, 15 Feb 2016 20:14:14 +1300 Subject: [PATCH] Fix compile error in CPU affinity struct cpu_set_t may be defined (eg on Hurd) even if the CPU affinity API is not fully existing, or a non-working stub. --- compat/cpu.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compat/cpu.h b/compat/cpu.h index f652aaff2e..e6e73f236c 100644 --- a/compat/cpu.h +++ b/compat/cpu.h @@ -18,9 +18,11 @@ #if !HAVE_CPU_AFFINITY /* failing replacements to minimize the number of if-HAVE_CPU_AFFINITYs */ +#if !defined(__cpu_set_t_defined) typedef struct { int bits; } cpu_set_t; +#endif inline int sched_setaffinity(int, size_t, cpu_set_t *) { return ENOTSUP; } inline int sched_getaffinity(int, size_t, cpu_set_t *) { return ENOTSUP; } #endif /* HAVE_CPU_AFFINITY */ -- 2.47.2