1
/*********************************************************
2
* Copyright (C) 1998 VMware, Inc. All rights reserved.
4
* This program is free software; you can redistribute it and/or modify it
5
* under the terms of the GNU General Public License as published by the
6
* Free Software Foundation version 2 and no later version.
8
* This program is distributed in the hope that it will be useful, but
9
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13
* You should have received a copy of the GNU General Public License along
14
* with this program; if not, write to the Free Software Foundation, Inc.,
15
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17
*********************************************************/
19
#ifndef __COMPAT_VERSION_H__
20
# define __COMPAT_VERSION_H__
22
#define INCLUDE_ALLOW_VMMON
23
#define INCLUDE_ALLOW_MODULE
24
#define INCLUDE_ALLOW_VMCORE
25
#define INCLUDE_ALLOW_VMNIXMOD
26
#define INCLUDE_ALLOW_DISTRIBUTE
27
#include "includeCheck.h"
31
# error "linux-version.h"
35
#include <linux/version.h>
37
/* Appeared in 2.1.90 --hpreg */
38
#ifndef KERNEL_VERSION
39
# define KERNEL_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + (c))
44
* Distinguish relevant classes of Linux kernels.
46
* The convention is that version X defines all
47
* the KERNEL_Y symbols where Y <= X.
49
* XXX Do not add more definitions here. This way of doing things does not
50
* scale, and we are going to phase it out soon --hpreg
53
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 1, 0)
57
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 2, 0)
61
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 3, 1)
65
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 3, 15)
67
# define KERNEL_2_3_15
70
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 3, 25)
72
# define KERNEL_2_3_25
75
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 3, 29)
76
/* even newer procfs */
77
# define KERNEL_2_3_29
80
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 3, 43)
82
# define KERNEL_2_3_43
85
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 3, 47)
86
/* more softnet changes */
87
# define KERNEL_2_3_47
90
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 3, 99)
91
/* name in netdevice struct is array and not pointer */
92
# define KERNEL_2_3_99
95
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0)
96
/* New 'owner' member at the beginning of struct file_operations */
100
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 8)
101
/* New netif_rx_ni() --hpreg */
102
# define KERNEL_2_4_8
105
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 22)
107
# define KERNEL_2_4_22
110
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 2)
111
/* New kdev_t, major()/minor() API --hpreg */
112
# define KERNEL_2_5_2
115
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 5)
116
/* New sk_alloc(), pte_offset_map()/pte_unmap() --hpreg */
117
# define KERNEL_2_5_5
121
#endif /* __COMPAT_VERSION_H__ */