scst: RHEL 5 build fix

Kernel versions before 2.6.26 do not have a definition for the
ACCESS_ONCE() macro, hence provide one.
    
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5220 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2014-01-21 14:35:22 +00:00
parent 72c1662421
commit 2ee6484c6d

View File

@@ -86,6 +86,14 @@ typedef _Bool bool;
#endif
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26)
/*
* See also patch "Move ACCESS_ONCE() to <linux/compiler.h>" (commit ID
* 9c3cdc1f83a6e07092392ff4aba6466517dbd1d0).
*/
#define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x))
#endif
#ifdef INSIDE_KERNEL_TREE
#include <scst/scst_sgv.h>
#else