Whamcloud - gitweb
LU-16111 build: Fix include of stddef.h 67/48367/3
authorShaun Tancheff <shaun.tancheff@hpe.com>
Sun, 28 Aug 2022 15:13:06 +0000 (22:13 +0700)
committerOleg Drokin <green@whamcloud.com>
Tue, 8 Nov 2022 08:52:20 +0000 (08:52 +0000)
In kernel builds include the linux/stddef.h

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

index 8204cd9..d530794 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>