File block-remove-genhd-h-v5.18.patch of Package lttng-modules.30334

From: Michael Jeanson <mjeanson@efficios.com>
Date: Mon Apr 4 13:54:59 2022 -0400
Git-commit: f9e76ad2bef7b04d8c51c2b5ac716b081e856d4f
Signed-off-by: Tony Jones <tonyj@suse.de>

    fix: block: remove genhd.h (v5.18)

    SUSE: Adjust this commit to reflect SLE15-SP5 backport

--- a/include/wrapper/genhd.h
+++ b/include/wrapper/genhd.h
@@ -12,7 +12,7 @@
 #ifndef _LTTNG_WRAPPER_GENHD_H
 #define _LTTNG_WRAPPER_GENHD_H
 
-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,18,0) || defined(CONFIG_SUSE_KERNEL))
 #include <linux/blkdev.h>
 #else
 #include <linux/genhd.h>
openSUSE Build Service is sponsored by