]> git.hungrycats.org Git - linux/commitdiff
[PATCH] gss_api build fix
authorAndrew Morton <akpm@osdl.org>
Sat, 22 May 2004 03:37:19 +0000 (20:37 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 22 May 2004 03:37:19 +0000 (20:37 -0700)
From: "J. Bruce Fields" <bfields@fieldses.org>

Older gcc's don't like that dimensionless array.  Remove it in favour of a
pointer to the data.

include/linux/sunrpc/gss_api.h
net/sunrpc/auth_gss/gss_krb5_mech.c

index cd38c702a63ce1015e30e7568200c0008abd986c..629957d710a0ded46f49918b522aac360cd54007 100644 (file)
@@ -75,7 +75,7 @@ struct gss_api_mech {
        struct gss_api_ops      *gm_ops;
        /* pseudoflavors supported by this mechanism: */
        int                     gm_pf_num;
-       struct pf_desc          gm_pfs[];
+       struct pf_desc *        gm_pfs;
 };
 
 /* and must provide the following operations: */
index e65ad5826f002c3b05ba940db1ef29a5be815990..0082fb5c999a1c035262dd51f4019396681f2945 100644 (file)
@@ -222,15 +222,25 @@ static struct gss_api_ops gss_kerberos_ops = {
        .gss_delete_sec_context = gss_delete_sec_context_kerberos,
 };
 
+static struct pf_desc gss_kerberos_pfs[] = {
+       [0] = {
+               .pseudoflavor = RPC_AUTH_GSS_KRB5,
+               .service = RPC_GSS_SVC_NONE,
+               .name = "krb5",
+       },
+       [1] = {
+               .pseudoflavor = RPC_AUTH_GSS_KRB5I,
+               .service = RPC_GSS_SVC_INTEGRITY,
+               .name = "krb5i",
+       },
+};
+
 static struct gss_api_mech gss_kerberos_mech = {
        .gm_name        = "krb5",
        .gm_owner       = THIS_MODULE,
        .gm_ops         = &gss_kerberos_ops,
-       .gm_pf_num      = 2,
-       .gm_pfs         = {
-               {RPC_AUTH_GSS_KRB5, 0, RPC_GSS_SVC_NONE, "krb5"},
-               {RPC_AUTH_GSS_KRB5I, 0, RPC_GSS_SVC_INTEGRITY, "krb5i"},
-       },
+       .gm_pf_num      = ARRAY_SIZE(gss_kerberos_pfs),
+       .gm_pfs         = gss_kerberos_pfs,
 };
 
 static int __init init_kerberos_module(void)