From: Xinliang Liu Date: Fri, 25 Aug 2023 03:24:12 +0000 (+0000) Subject: LU-17052 libcfs: fix build for old kernel X-Git-Tag: 2.15.59~180 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F90%2F52090%2F4;p=fs%2Flustre-release.git LU-17052 libcfs: fix build for old kernel Fix build for kernel v4.17 to v4.19. These old kernels already have xarray.h and #include by fs.h but don't have full xarray support. It is needed to #include libcfs's xarray.h also to contain xarray support. Rename the header define macro to ensure libcfs's xarray.h will be included。 Test-Parameters: trivial Test-Parameters: testlist=sanityn envdefinitions=ONLY=77,ONLY_REPEAT=20 Fixes: 778791dd7da1 ("LU-8130 libcfs: don't use radix tree for xarray") Change-Id: I760c394cc1d885c2de79d1770243ab7f292b9b3a Signed-off-by: Xinliang Liu Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52090 Tested-by: Maloo Tested-by: jenkins Reviewed-by: Oleg Drokin Reviewed-by: Timothy Day Reviewed-by: James Simmons Reviewed-by: Andreas Dilger --- diff --git a/libcfs/include/libcfs/linux/xarray.h b/libcfs/include/libcfs/linux/xarray.h index 74397ab..b252aaf 100644 --- a/libcfs/include/libcfs/linux/xarray.h +++ b/libcfs/include/libcfs/linux/xarray.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0+ */ -#ifndef _LINUX_XARRAY_H -#define _LINUX_XARRAY_H +#ifndef _LINUX_XARRAY_LUSTRE_H +#define _LINUX_XARRAY_LUSTRE_H /* * eXtensible Arrays * Copyright (c) 2017 Microsoft Corporation @@ -1763,4 +1763,4 @@ static inline void *xas_next(struct xa_state *xas) } #endif /* !HAVE_XARRAY_SUPPORT */ -#endif /* _LINUX_XARRAY_H */ +#endif /* _LINUX_XARRAY_LUSTRE_H */