From 2ee6484c6de8f99a1837f4d897af9f7531022a67 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 21 Jan 2014 14:35:22 +0000 Subject: [PATCH] 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 git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5220 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/scst.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scst/include/scst.h b/scst/include/scst.h index 23444523c..8c7f89206 100644 --- a/scst/include/scst.h +++ b/scst/include/scst.h @@ -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 " (commit ID + * 9c3cdc1f83a6e07092392ff4aba6466517dbd1d0). + */ +#define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x)) +#endif + #ifdef INSIDE_KERNEL_TREE #include #else