> > On Thu, 2019-10-10 at 14:46 -0400, Ihor Antonov wrote:
> > > Docker build of portable branch is broken
> > > Github issue
> > https://github.com/OpenSMTPD/OpenSMTPD/issues/944
> > 

I think I found the problem, but I don't know how to fix it.

In ./openbsd-compat/openbsd-compat.h:

#if defined(HAVE_ARC4RANDOM_STIR)
void arc4random_stir(void);
#elif defined(HAVE_ARC4RANDOM) || defined(LIBRESSL_VERSION_NUMBER)
/* Recent system/libressl implementation; no need for explicit stir */
# define arc4random_stir()
#else
/* openbsd-compat/arc4random.c provides arc4random_stir() */
void arc4random_stir(void);
#endif


In ./openbsd-compat/arc4random.c:

void
arc4random_stir(void)
{
        _ARC4_LOCK();
        _rs_stir();
        _ARC4_UNLOCK();
}

HAVE_ARC4RANDOM_STIR - not defined
HAVE_ARC4RANDOM - not defined
LIBRESSL_VERSION_NUMBER - defined!

so it results in mismatch between header definition and arc4random.c


# define arc4random_stir()
vs
void arc4random_stir(void)


Need your advice on how to fix this.

A side thought - every linux distro has libbsd[0] we should just use it
[0]https://gitlab.freedesktop.org/libbsd/libbsd


Reply via email to