Hello Peter,
I can say so far, your patch solved the issue! Great thanks for that!
Regarding the libc version:
From my WSL2 Ubuntu 21.04 x86_64:
$ ls -l /lib32/libc*
-rwxr-xr-x 1 root root 2042632 Mar 31 2021 /lib32/
libc-2.33.so
My gcc version 10 does use the same libc version.
As already mentioned, I can also reproduce this on a VM with Ubuntu 20.04 and libc-2.31.
In addition, originally, this issue was first reproduced with an own buildroot RootFS and containing libc-2.28.
As you see, the libcs are not that old. What about the virtual environment? I could not check this hypothesis, but I hope to do so soon.
Thank you again and best regards
Jon