diff options
author | Hanoh Haim <hhaim@cisco.com> | 2015-06-24 14:03:29 +0300 |
---|---|---|
committer | Hanoh Haim <hhaim@cisco.com> | 2015-06-24 14:03:29 +0300 |
commit | 8b52a31ed2c299b759f330c4f976b9c70f5765f4 (patch) | |
tree | 9d6da5438b5b56b1d2d57e6c13494b4e65d000e7 /src/dpdk_lib18/librte_eal/linuxapp/kni/compat.h |
first version
Diffstat (limited to 'src/dpdk_lib18/librte_eal/linuxapp/kni/compat.h')
-rwxr-xr-x | src/dpdk_lib18/librte_eal/linuxapp/kni/compat.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/dpdk_lib18/librte_eal/linuxapp/kni/compat.h b/src/dpdk_lib18/librte_eal/linuxapp/kni/compat.h new file mode 100755 index 00000000..13135236 --- /dev/null +++ b/src/dpdk_lib18/librte_eal/linuxapp/kni/compat.h @@ -0,0 +1,21 @@ +/* + * Minimal wrappers to allow compiling kni on older kernels. + */ + +#ifndef RHEL_RELEASE_VERSION +#define RHEL_RELEASE_VERSION(a, b) (((a) << 8) + (b)) +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39) && \ + (!(defined(RHEL_RELEASE_CODE) && \ + RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(6, 4))) + +#define kstrtoul strict_strtoul + +#endif /* < 2.6.39 */ + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35) + +#define sk_sleep(s) (s)->sk_sleep + +#endif /* < 2.6.35 */ |