I'm curious, do you know what function was being declared implicitly? That's really atypical in modern C code, so there's probably a missing #include somewhere that could be fixed upstream.
We're on an older version of Ruby so that's the most likely reason. MacOS Monterrey is really new and we deploy to RHEL so the differences in versions can be fairly stark.