Linux 3.18: key_type no longer has a match op
[openafs.git] / src / afs / LINUX / osi_groups.c
index f3f87c2..f1d97a6 100644 (file)
@@ -498,10 +498,12 @@ error:
     return code;
 }
 
+#if defined(STRUCT_KEY_TYPE_HAS_MATCH)
 static int afs_pag_match(const struct key *key, const void *description)
 {
        return strcmp(key->description, description) == 0;
 }
+#endif
 
 static void afs_pag_destroy(struct key *key)
 {
@@ -527,7 +529,9 @@ struct key_type key_type_afs_pag =
 #else
     .instantiate = afs_pag_instantiate,
 #endif
+#if defined(STRUCT_KEY_TYPE_HAS_MATCH)
     .match       = afs_pag_match,
+#endif
     .destroy     = afs_pag_destroy,
 };