mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-19 11:41:26 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user