The glibc 2.41 update has been causing problems for Linux gaming
update: glibc
`glibc` version too damn high?
Linux binary requires glibc 2.38/2.39 — fails on Ubuntu 22.04 and Debian 11
The fundamental problem is that the glibc version is a string and not a decimal number. So for a "proper" solution you need to parse it manually and implement your own logic to decide which version is bigger or smaller.
However, as a quick and dirty hack, try inserting the line
setlocale(LC_NUMERIC, "C");
before the strtod call. That will set the numeric locale back to the default C locale where the decimal separator is .. If you're doing something that needs correct locales later in the program you need to set it back again. Depending on how your program initialized locales earlier, something like
setlocale(LC_NUMERIC, "");
should reset it back to what the environment says the locale should be.
Could this be the locale of the user? The decimal separator is not a '.' in all locales and stod uses the current locale?