2 * Minimal wrappers to allow compiling kni on older kernels.
5 #ifndef RHEL_RELEASE_VERSION
6 #define RHEL_RELEASE_VERSION(a, b) (((a) << 8) + (b))
9 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39) && \
10 (!(defined(RHEL_RELEASE_CODE) && \
11 RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(6, 4)))
13 #define kstrtoul strict_strtoul
17 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
18 #define sk_sleep(s) (s)->sk_sleep
21 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
22 #define HAVE_IOV_ITER_MSGHDR
25 #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 0)
26 #define HAVE_KIOCB_MSG_PARAM
29 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
30 #define HAVE_TRANS_START_HELPER