"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Thomas Adam <thomas@xteddy.org>
Subject:
Re: "got fetch" fails on PROFILE=1 build
To:
Christian Weisgerber <naddy@mips.inka.de>, gameoftrees@openbsd.org
Date:
Tue, 12 Apr 2022 13:47:52 +0100

Download raw body.

Thread
Hi,

On Tue, 12 Apr 2022 at 13:37, Stefan Sperling <stsp@stsp.name> wrote:
>
> On Tue, Apr 12, 2022 at 02:17:47PM +0200, Christian Weisgerber wrote:
> > Mikhail:
> >
> > > > We could simply disable both pledge and unveil if profiling is used.
> > > > It is just a debug build so there is no reason to make things complicated.
> > >
> > > Disabling looks like the best solution.
> >
> > > +#ifndef PROFILE
> > > -#ifdef PROFILE
> > > -#endif
> > > +#endif
> >
> > Instead of this #ifdef maze, should we neuter pledge() and unveil()
> > with defines in a central header file?
> >
> > #ifdef PROFILE
> > #undef pledge
> > #undef unveil
> > #define pledge(x, y)    0
> > #define unveil(x, y)    0
> > #endif
> >
> > What would be a good place?
>
> Perhaps near the top of each .c file which calls pledge or unveil?
> There are not that many.

You could do this -- there's still about a dozen files though -- one
downside to duplicating it like this is the potential for conflicts
with -portable which if we can avoid this, would make things easier.

If possible, I would rather see this defined in a .h file somewhere
and have that #include'd where required.

Kindly,
Thomas