Commit 9b19f4f0 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] gss_api build fix

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.
parent f0ab7d06
...@@ -75,7 +75,7 @@ struct gss_api_mech { ...@@ -75,7 +75,7 @@ struct gss_api_mech {
struct gss_api_ops *gm_ops; struct gss_api_ops *gm_ops;
/* pseudoflavors supported by this mechanism: */ /* pseudoflavors supported by this mechanism: */
int gm_pf_num; int gm_pf_num;
struct pf_desc gm_pfs[]; struct pf_desc * gm_pfs;
}; };
/* and must provide the following operations: */ /* and must provide the following operations: */
......
...@@ -222,15 +222,25 @@ static struct gss_api_ops gss_kerberos_ops = { ...@@ -222,15 +222,25 @@ static struct gss_api_ops gss_kerberos_ops = {
.gss_delete_sec_context = gss_delete_sec_context_kerberos, .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 = { static struct gss_api_mech gss_kerberos_mech = {
.gm_name = "krb5", .gm_name = "krb5",
.gm_owner = THIS_MODULE, .gm_owner = THIS_MODULE,
.gm_ops = &gss_kerberos_ops, .gm_ops = &gss_kerberos_ops,
.gm_pf_num = 2, .gm_pf_num = ARRAY_SIZE(gss_kerberos_pfs),
.gm_pfs = { .gm_pfs = gss_kerberos_pfs,
{RPC_AUTH_GSS_KRB5, 0, RPC_GSS_SVC_NONE, "krb5"},
{RPC_AUTH_GSS_KRB5I, 0, RPC_GSS_SVC_INTEGRITY, "krb5i"},
},
}; };
static int __init init_kerberos_module(void) static int __init init_kerberos_module(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment