From 8ce7f28a88a4917fbc4cb8a92dae3e4763782bd9 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 2 Aug 2020 14:41:21 +0000 Subject: [PATCH] scst/include/backport.h: Fix the build against CentOS 8.2 (merge r9024 from trunk) git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.4.x@9088 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/backport.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scst/include/backport.h b/scst/include/backport.h index f33d0b432..4380559f5 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -843,7 +843,9 @@ static inline bool list_entry_in_list(const struct list_head *entry) * See also commit 108c14858b9e ("locking/lockdep: Add support for dynamic * keys"). */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0) && \ + (!defined(RHEL_MAJOR) || RHEL_MAJOR -0 < 8 || \ + (RHEL_MAJOR -0 == 8 && RHEL_MINOR -0 < 2)) static inline void lockdep_register_key(struct lock_class_key *key) { }