From c0db1029f4c2899b63374a70f8eb90649bd9351b Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 24 Jul 2019 15:35:19 +0000 Subject: [PATCH] scst: Fix the MOFED build (merge r8479 from trunk) git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.3.x@8480 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/backport.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scst/include/backport.h b/scst/include/backport.h index 3ebdf5770..77fb3ef2f 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -905,7 +905,8 @@ static inline void *kvzalloc(size_t size, gfp_t flags) } #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 18, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 18, 0) && \ + !defined(_COMPAT_LINUX_MM_H) /* See also commit 1c542f38ab8d ("mm: Introduce kvcalloc()") # v4.18. */ static inline void *kvcalloc(size_t n, size_t size, gfp_t flags) { @@ -1332,7 +1333,8 @@ static inline void sg_unmark_end(struct scatterlist *sg) (__flags), NULL, NULL) #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0) && \ + !defined(_COMPAT_LINUX_MM_H) /* * See also commit 3942d2991852 ("mm/slab_common: allow NULL cache pointer in * kmem_cache_destroy()") # v4.3.