Thursday, June 17, 2021

Re: [base-gcc] fix build of net/tor

On 2021/06/17 10:53, Stefan Sperling wrote:
> On Thu, Jun 17, 2021 at 09:12:11AM +0200, Theo Buehler wrote:
> > gcc 4.2.1 doesn't like the initialization with a const int (which is not
> > really a constant):
> >
> > http://build-failures.rhaalovely.net/sparc64/2021-06-15/net/tor.log
> >
> > This fixes the build on sparc64, same fix is probably needed for
> > -stable.
>
> ok stsp@

btw the version in -stable doesn't have rate-limiting for that log
entry so is unaffected

> > +Index: src/feature/dirclient/dirclient.c
> > +--- src/feature/dirclient/dirclient.c.orig
> > ++++ src/feature/dirclient/dirclient.c
> > +@@ -1873,8 +1873,7 @@ dir_client_decompress_response_body(char **bodyp, size
> > + /* If we're pretty sure that we have a compressed directory, and
> > + * we didn't manage to uncompress it, then warn and bail. */
> > + if (!plausible && !new_body) {
> > +- const int LOG_INTERVAL = 3600;
> > +- static ratelim_t warning_limit = RATELIM_INIT(LOG_INTERVAL);
> > ++ static ratelim_t warning_limit = RATELIM_INIT(3600);
> > + log_fn_ratelim(&warning_limit, LOG_WARN, LD_HTTP,
> > + "Unable to decompress HTTP body (tried %s%s%s, on %s).",
> > + description1,

No comments:

Post a Comment