Skip to content

Commit eb2c766

Browse files
committed
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] torvalds/linux@b296a6d
1 parent c69eff9 commit eb2c766

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

examples/procfs3.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
#include <linux/sched.h>
99
#include <linux/uaccess.h>
1010
#include <linux/version.h>
11+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
1112
#include <linux/minmax.h>
13+
#endif
1214

1315
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
1416
#define HAVE_PROC_OPS

0 commit comments

Comments
 (0)