mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-22 21:21:28 +00:00
scst_sysfs: Fix a build failure on kernels 2.6.2[678]
The sysfs API is supported from kernel 2.6.26 on and uses the swap() macro while the swap() macro was introduced in kernel 2.6.29. Hence provide a definition of the swap() macro for kernels before 2.6.29. Signed-off-by: Sebastian Herbszt <herbszt@gmx.de> [bvanassche: Moved swap() definition a few lines down and added #ifndef/#endif] git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5269 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -119,6 +119,13 @@ typedef _Bool bool;
|
||||
#define nr_cpumask_bits NR_CPUS
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)
|
||||
#ifndef swap
|
||||
#define swap(a, b) \
|
||||
do { typeof(a) __tmp = (a); (a) = (b); (b) = __tmp; } while (0)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* verify cpu argument to cpumask_* operators */
|
||||
static inline unsigned int cpumask_check(unsigned int cpu)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user