From: "J. Bruce Fields" Older gcc's don't like that dimensionless array. Remove it in favour of a pointer to the data. --- 25-akpm/include/linux/sunrpc/gss_api.h | 2 +- 25-akpm/net/sunrpc/auth_gss/gss_krb5_mech.c | 20 +++++++++++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff -puN include/linux/sunrpc/gss_api.h~gss_api-build-fix include/linux/sunrpc/gss_api.h --- 25/include/linux/sunrpc/gss_api.h~gss_api-build-fix Fri May 21 14:33:09 2004 +++ 25-akpm/include/linux/sunrpc/gss_api.h Fri May 21 14:33:09 2004 @@ -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: */ diff -puN net/sunrpc/auth_gss/gss_krb5_mech.c~gss_api-build-fix net/sunrpc/auth_gss/gss_krb5_mech.c --- 25/net/sunrpc/auth_gss/gss_krb5_mech.c~gss_api-build-fix Fri May 21 14:33:09 2004 +++ 25-akpm/net/sunrpc/auth_gss/gss_krb5_mech.c Fri May 21 14:33:09 2004 @@ -222,15 +222,25 @@ static struct gss_api_ops gss_kerberos_o .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 = sizeof(gss_kerberos_pfs)/sizeof(gss_kerberos_pfs[0]), + .gm_pfs = gss_kerberos_pfs, }; static int __init init_kerberos_module(void) _