From 55b8d2931f07ea3e6fa263f075dc41332e73c263 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 22 Jul 2022 18:38:21 +0200 Subject: [PATCH] heimdal: Fix the 32-bit build on FreeBSD REF: https://github.com/heimdal/heimdal/pull/1004 BUG: https://bugzilla.samba.org/show_bug.cgi?id=15220 Signed-off-by: Volker Lendecke Reviewed-by: Andrew Bartlett (cherry picked from commit ab4c7bda8daccdb99adaf6ec7fddf8b5f84be09a) --- third_party/heimdal/kdc/gss_preauth.c | 2 +- third_party/heimdal/lib/asn1/gen_encode.c | 4 ++-- third_party/heimdal/lib/asn1/gen_template.c | 4 ++-- third_party/heimdal/lib/base/log.c | 2 +- third_party/heimdal/lib/krb5/ticket.c | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/third_party/heimdal/kdc/gss_preauth.c b/third_party/heimdal/kdc/gss_preauth.c index d8a2a24fd94..24663deb03a 100644 --- a/third_party/heimdal/kdc/gss_preauth.c +++ b/third_party/heimdal/kdc/gss_preauth.c @@ -493,7 +493,7 @@ _kdc_gss_endtime(astgs_request_t r, endtime = kdc_time + gcp->lifetime; kdc_log(r->context, r->config, 10, - "GSS pre-authentication endtime is %ld", endtime); + "GSS pre-authentication endtime is %ld", (long)endtime); return endtime; } diff --git a/third_party/heimdal/lib/asn1/gen_encode.c b/third_party/heimdal/lib/asn1/gen_encode.c index d61dc2e6d50..403ddac2f77 100644 --- a/third_party/heimdal/lib/asn1/gen_encode.c +++ b/third_party/heimdal/lib/asn1/gen_encode.c @@ -552,7 +552,7 @@ encode_type (const char *name, const Type *t, const char *tmpstr) * \ * +-- psave_ */ - "e = der_put_tag(psave_%s, %lu, %s, %s, %d, &l2_%s);\n" + "e = der_put_tag(psave_%s, %zu, %s, %s, %d, &l2_%s);\n" "if (e) { free(pfree_%s); return e; }\n" /* Restore `len' and adjust it (see `p' below) */ "len = lensave_%s - (l + %zu - asn1_tag_length_%s);\n" @@ -573,7 +573,7 @@ encode_type (const char *name, const Type *t, const char *tmpstr) * \ * +-- p */ - "p = psave_%s - (1 + %lu - asn1_tag_length_%s); }\n", + "p = psave_%s - (1 + %zu - asn1_tag_length_%s); }\n", tmpstr, tmpstr, tmpstr, t->subtype->symbol->name, tmpstr, t->subtype->symbol->name, t->subtype->symbol->name, tmpstr, length_tag(t->tag.tagvalue), diff --git a/third_party/heimdal/lib/asn1/gen_template.c b/third_party/heimdal/lib/asn1/gen_template.c index 883eab4b671..e053a8bdd8b 100644 --- a/third_party/heimdal/lib/asn1/gen_template.c +++ b/third_party/heimdal/lib/asn1/gen_template.c @@ -830,7 +830,7 @@ template_object_set(IOSObjectSet *os, Field *typeidfield, Field *opentypefield) } free(objects); - tlist_header(tl, "{ 0, 0, ((void *)(uintptr_t)%lu) }", nobjs); + tlist_header(tl, "{ 0, 0, ((void *)(uintptr_t)%zu) }", nobjs); tlist_print(tl); tlist_add(tl); os->symbol->emitted_template = 1; @@ -970,7 +970,7 @@ template_members(struct templatehead *temp, "{ A1_OP_NAME, %d, \"%s\" }", (int)m->val, m->name); nmemb++; } - tlist_header(tl, "{ 0, 0, ((void *)(uintptr_t)%lu) }", nmemb); + tlist_header(tl, "{ 0, 0, ((void *)(uintptr_t)%zu) }", nmemb); /* XXX Accidentally O(N^2)? */ if (!tlist_find_dup(tl)) { tlist_print(tl); diff --git a/third_party/heimdal/lib/base/log.c b/third_party/heimdal/lib/base/log.c index 818ac8398d5..24295b5adbc 100644 --- a/third_party/heimdal/lib/base/log.c +++ b/third_party/heimdal/lib/base/log.c @@ -849,7 +849,7 @@ heim_audit_addkv_timediff(heim_svc_req_desc r, const char *k, sec -= 1; } - heim_audit_addkv(r, 0, k, "%s%ld.%06d", sign, sec, usec); + heim_audit_addkv(r, 0, k, "%s%ld.%06d", sign, (long)sec, usec); } void diff --git a/third_party/heimdal/lib/krb5/ticket.c b/third_party/heimdal/lib/krb5/ticket.c index e2f2ab2085c..d19fcc64f9f 100644 --- a/third_party/heimdal/lib/krb5/ticket.c +++ b/third_party/heimdal/lib/krb5/ticket.c @@ -897,7 +897,7 @@ _krb5_extract_ticket(krb5_context context, ret = KRB5KRB_AP_ERR_SKEW; krb5_set_error_message (context, ret, N_("time skew (%ld) larger than max (%ld)", ""), - krb5_time_abs(tmp_time, sec_now), + (long)krb5_time_abs(tmp_time, sec_now), (long)context->max_skew); goto out; } -- 2.35.0