diff options
author | Stefan Metzmacher <metze@samba.org> | 2012-06-10 16:21:12 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2012-06-10 18:16:28 +0200 |
commit | 0eeaf10fd0ef37c2db497bfe39ed97d761593946 (patch) | |
tree | 38aa0a36e1b44a2873d0cce39743383ea02d2a5a | |
parent | c48e307de497298d62f0daa94bd43d91e137b0b9 (diff) | |
download | samba-0eeaf10fd0ef37c2db497bfe39ed97d761593946.tar.gz samba-0eeaf10fd0ef37c2db497bfe39ed97d761593946.tar.bz2 samba-0eeaf10fd0ef37c2db497bfe39ed97d761593946.zip |
heimdal:lib/asn1: try to fix the build on IRIX
cc-1028 cc: ERROR File = ../source4/heimdal/lib/asn1/gen_template.c, Line = 548
The expression used must have a constant value.
struct templatehead template = { 0L, &(template). tqh_first };
^
If this really fixes the IRIX build, we'll propose this for heimdal upstream.
metze
-rw-r--r-- | source4/heimdal/lib/asn1/gen_template.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/heimdal/lib/asn1/gen_template.c b/source4/heimdal/lib/asn1/gen_template.c index edd68e1223..06e48e2760 100644 --- a/source4/heimdal/lib/asn1/gen_template.c +++ b/source4/heimdal/lib/asn1/gen_template.c @@ -545,13 +545,15 @@ template_members(struct templatehead *temp, const char *basetype, const char *na case TNull: break; case TBitString: { - struct templatehead template = ASN1_TAILQ_HEAD_INITIALIZER(template); + struct templatehead template; struct template *q; Member *m; size_t count = 0, i; char *bname = NULL; FILE *f = get_code_file(); + ASN1_TAILQ_INIT(&template); + if (ASN1_TAILQ_EMPTY(t->members)) { add_line(temp, "{ A1_PARSE_T(A1T_HEIM_BIT_STRING), %s, NULL }", poffset); break; @@ -681,7 +683,7 @@ template_members(struct templatehead *temp, const char *basetype, const char *na break; } case TChoice: { - struct templatehead template = ASN1_TAILQ_HEAD_INITIALIZER(template); + struct templatehead template; struct template *q; size_t count = 0, i; char *tname = NULL; @@ -690,6 +692,8 @@ template_members(struct templatehead *temp, const char *basetype, const char *na int ellipsis = 0; char *e; + ASN1_TAILQ_INIT(&template); + if (asprintf(&tname, "asn1_choice_%s_%s%x", basetype, name ? name : "", (unsigned int)(uintptr_t)t) < 0 || tname == NULL) errx(1, "malloc"); |