From: Amos Jeffries Date: Mon, 15 Feb 2016 06:59:09 +0000 (+1300) Subject: Fix compile error in CPU affinity X-Git-Tag: SQUID_4_0_6~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e51a90df6e82589fac822835115bf4e1cae45801;p=thirdparty%2Fsquid.git 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. --- 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 */