Whamcloud - gitweb
LU-16111 build: Fix include of stddef.h 05/49105/3
authorShaun Tancheff <shaun.tancheff@hpe.com>
Thu, 26 Jan 2023 05:23:43 +0000 (21:23 -0800)
committerOleg Drokin <green@whamcloud.com>
Wed, 8 Mar 2023 06:44:30 +0000 (06:44 +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/fs/lustre-release/+/49105
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: jsimmons <jsimmons@infradead.org>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.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>