Cleanup usage of LINUX_VERSION_CODE for older kernels
[openafs.git] / src / afs / sysincludes.h
index 629b3e6..bea5aab 100644 (file)
 # include <sys/protosw.h>
 # include <sys/ioctl.h>
 
-#elif defined(AFS_LINUX22_ENV)
+#elif defined(AFS_LINUX_ENV)
 # include <linux/version.h>
 # ifdef HAVE_LINUX_CONFIG_H
 #  include <linux/config.h>
 # include <linux/net.h>
 # include <linux/kdev_t.h>
 # include <linux/ioctl.h>
-# if defined(AFS_LINUX26_ENV)
+# if defined(AFS_LINUX_ENV)
+#  include <linux/compat.h>
 #  include <linux/backing-dev.h>
 #  include <linux/pagemap.h>
 #  include <linux/namei.h>
@@ -168,25 +169,15 @@ struct xfs_inode_info {
 # else
 #  include <asm/semaphore.h>
 # endif
-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
-#  include <linux/mutex.h>
-# endif
+# include <linux/mutex.h>
 # include <linux/errno.h>
 # include <linux/completion.h>
 # if defined(HAVE_LINUX_EXPORTFS_H)
 #  include <linux/exportfs.h>
 # endif
-# ifdef AFS_LINUX24_ENV
-#  include <linux/pagemap.h>
-# endif
+# include <linux/pagemap.h>
 
-#else /* AFS_LINUX22_ENV */
-# if defined(AFS_DARWIN_ENV)
-#  ifndef _MACH_ETAP_H_
-#   define _MACH_ETAP_H_
-typedef unsigned short etap_event_t;
-#  endif
-# endif
+#else /* AFS_LINUX_ENV */
 
 # include "h/errno.h"
 # include "h/types.h"
@@ -211,6 +202,7 @@ typedef unsigned short etap_event_t;
 #  include <sys/socket.h>
 #  include <net/if.h>
 #  include <net/if_var.h>
+#  include <sys/rmlock.h>
 # endif
 
 # ifdef        AFS_AIX_ENV
@@ -406,7 +398,6 @@ MALLOC_DECLARE(M_AFS);
 #  endif
 # endif /* AFS_SUN5_ENV */
 
-# include "rpc/types.h"
 # include "rx/xdr.h"
 
 /* Miscellaneous headers */
@@ -454,7 +445,7 @@ MALLOC_DECLARE(M_AFS);
 #  include <sys/debug.h>
 # endif
 
-#endif /* AFS_LINUX22_ENV */
+#endif /* AFS_LINUX_ENV */
 
 #endif /* __AFS_SYSINCLUDESH__  so idempotent */