DEVEL15-ifdef-nfs-translator-20070102
[openafs.git] / src / afs / LINUX / osi_pag_module.c
index 7b5d015..f98c661 100644 (file)
@@ -17,6 +17,7 @@
 RCSID
     ("$Header$");
 
+#if !defined(AFS_NONFSTRANS) || defined(AFS_AIX_IAUTH_ENV)
 #include <linux/module.h> /* early to avoid printf->printk mapping */
 #include "afs/sysincludes.h"
 #include "afsincludes.h"
@@ -55,7 +56,11 @@ MODULE_PARM(this_cell, "s");
 MODULE_PARM_DESC(this_cell, "Local cell name");
 
 #if defined(AFS_LINUX24_ENV)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
+DEFINE_MUTEX(afs_global_lock);
+#else
 DECLARE_MUTEX(afs_global_lock);
+#endif
 struct proc_dir_entry *openafs_procfs;
 #else
 struct semaphore afs_global_lock = MUTEX;
@@ -136,3 +141,5 @@ afs_nfsclient_reqhandler(struct afs_exporter *exporter,
     return EINVAL;
 }
 #endif
+#endif /* AFS_NONFSTRANS */
+