File 0030-LU-16111-build-Fix-include-of-stddef.h.patch of Package lustre_2_12

From fce4eebc48a7f9415f3bfb1ca06de1edc3e61552 Mon Sep 17 00:00:00 2001
From: Shaun Tancheff <shaun.tancheff@hpe.com>
Date: Sun, 28 Aug 2022 22:13:06 +0700
Subject: [PATCH 30/35] LU-16111 build: Fix include of stddef.h

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 | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lustre/include/uapi/linux/lustre/lustre_fiemap.h b/lustre/include/uapi/linux/lustre/lustre_fiemap.h
index beea76d98fa3..858f8c9840b4 100644
--- a/lustre/include/uapi/linux/lustre/lustre_fiemap.h
+++ b/lustre/include/uapi/linux/lustre/lustre_fiemap.h
@@ -41,10 +41,12 @@
 #ifndef _LUSTRE_FIEMAP_H
 #define _LUSTRE_FIEMAP_H
 
-#ifndef __KERNEL__
-#include <stddef.h>
-#include <linux/fiemap.h>
+#ifdef __KERNEL__
+# include <linux/stddef.h>
+#else
+# include <stddef.h>
 #endif
+#include <linux/fiemap.h>
 #include <linux/types.h>
 
 /* XXX: We use fiemap_extent::fe_reserved[0] */
-- 
2.41.0

openSUSE Build Service is sponsored by