'Unable to compile SDL2 for obscure reasons

I don't know if the current SDL code source is reliable (normally it is), but here is what I got when I try to compile it by myself.

/usr/include/spa-0.2/spa/utils/string.h: In "spa_strtod" function:
/usr/include/spa-0.2/spa/utils/string.h:325:9: error: ISO C90 prohibits mixing declarations and code [-Werror=declaration-after-statement]
   325 | locale_t prev = uselocale(locale);
       | ^~~~~~~~
cc1: some warnings are treated as errors
make: *** [Makefile:627:build/SDL_pipewire.lo] Error 1

I'm on Arch, I'm using gcc as C/C++ compiler. Please help me because I need to recompile SDL myself to maybe solve another problem I got with the library.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source