It must be something else then. This is a rebuild of a build that used to work, is it not?
Yes, looking at logs, previously configure didn't find arc4random_buf so the build worked. Now check_func does find it. As you point out, it has been added.
Git tells us arc4random_buf was added to libc with
commit e2e275c0159a1a258681b64241f88b492b2b9345
Author: Dmitriy Kuminov <coding@dmik.org>
Date: Sun Oct 19 23:34:54 2025 -0700
Add `arc4random_buf`.
The implementation is trivial (and differs from current FreeBSD)
but it should be sufficient for ports needing this function.
Closes #151.
Is it possible you are run picking up the right stdlib.h?
Yes, I'm picking up the right stdlib.h. Used to be that it was easy to add -E to CXXFLAGS and look at the preprocessor output, but not now.
I've refactored some stuff and added the define to CXXFLAGS, we'll see in about 45 minutes if the build succeeds.
Not that it should matter, but what gcc are you building with?
The system 9.2.0
Edit: forgot to mention that editing mozilla-config.h to remove #define HAVE_ARC4RANDOM_BUF 1 allows the build to succeed as expected. Shouldn't need to edit config.h.