From eb2c766da444dece21f170bacdcc201d88ccf088 Mon Sep 17 00:00:00 2001 From: linD026 Date: Wed, 21 Sep 2022 13:53:06 +0800 Subject: [PATCH] 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 --- examples/procfs3.c | 2 ++ 1 file changed, 2 insertions(+) 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