Build fails with GRND_NONBLOCK undefined. It seems that uclibc-ng only supports getrandom if _GNU_SOURCE is defined. The ebuild is configuring wpa_supplicant with CONFIG_GETRANDOM always turned on. The patch to follow makes that conditional. With CONFIG_GETRANDOM turned off, it falls back to using /dev/random the way it worked in prior releases. Alternatively, we could turn on _GNU_SOURCE, but I feel that disabling getrandom is more conservative and I don't know what else _GNU_SOURCE adds in. I assume this would also need to be appliled to 2.9 and 9999 ebuilds. Reproducible: Always
Created attachment 591116 [details, diff] Proof of concept patch on 2.8-r1 ebuild
I confirm the issue. FWIW, I've been using the following “fix” since ≈2019-11 to this day (2.9-r2) but I don't know what I'm doing: > --- a/src/crypto/random.c > +++ b/src/crypto/random.c > @@ -25,9 +25,7 @@ > #include "utils/includes.h" > #ifdef __linux__ > #include <fcntl.h> > -#ifdef CONFIG_GETRANDOM > -#include <sys/random.h> > -#endif /* CONFIG_GETRANDOM */ > +#include <linux/random.h> > #endif /* __linux__ */ > > #include "utils/common.h"
uclibc support in Gentoo has been removed.