Whamcloud - gitweb
LU-16111 build: Fix include of stddef.h
authorShaun Tancheff <shaun.tancheff@hpe.com>
Tue, 31 Jan 2023 07:25:28 +0000 (23:25 -0800)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 16 Feb 2023 21:16:23 +0000 (21:16 +0000)
In kernel builds include the linux/stddef.h

Lustre-change: https://review.whamcloud.com/48367
Lustre-commit: 95f7ef609467a9534b0b1639eba0ef5a2c02f21f

Test-Parameters: trivial
HPE-bug-id: LUS-11185
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I0db81e01fadd01445515f96b3d04a2ec51f43044
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/49781
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Yang Sheng <ys@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/include/uapi/linux/lustre/lustre_fiemap.h

index ddea799..00dca18 100644 (file)
 #ifndef _LUSTRE_FIEMAP_H
 #define _LUSTRE_FIEMAP_H
 
-#include <stddef.h>
+#ifdef __KERNEL__
+# include <linux/stddef.h>
+#else
+# include <stddef.h>
+#endif
 #include <linux/fiemap.h>
 #include <linux/types.h>