From: linD026 Date: Wed, 21 Sep 2022 05:53:06 +0000 (+0800) Subject: Improve the compatibility with kernel < v5.10 X-Git-Tag: latest~52^2 X-Git-Url: https://www.ivnss.com/gitweb/?a=commitdiff_plain;h=eb2c766da444dece21f170bacdcc201d88ccf088;p=lkmpg Improve the compatibility with kernel < v5.10 min()/max() splited from kernel.h to minmax.h since v5.10-rc1. Before v5.10, minmax.h doesn't exist [1]. [1] https://github.com/torvalds/linux/commit/b296a6d53339a79082c1d2c1761e948e8b3def69 --- diff --git a/examples/procfs3.c b/examples/procfs3.c index 6d41417..ff741f7 100644 --- a/examples/procfs3.c +++ b/examples/procfs3.c @@ -8,7 +8,9 @@ #include #include #include +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0) #include +#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) #define HAVE_PROC_OPS