Conflicting types in sdl2-dev
When compiling U-Boot which uses -fshort-wchar the following error occurs:
In file included from /usr/include/SDL2/SDL_stdinc.h:47,
from /usr/include/SDL2/SDL_main.h:25,
from /usr/include/SDL2/SDL.h:32,
from arch/sandbox/cpu/sdl.c:10:
/usr/lib/gcc/x86_64-alpine-linux-musl/10.3.1/include/stddef.h:321:24: error: conflicting types for 'wchar_t'
321 | typedef __WCHAR_TYPE__ wchar_t;
| ^~~~~~~
In file included from /usr/include/stdlib.h:19,
from /usr/include/fortify/stdlib.h:22,
from /usr/include/SDL2/SDL_stdinc.h:46,
from /usr/include/SDL2/SDL_main.h:25,
from /usr/include/SDL2/SDL.h:32,
from arch/sandbox/cpu/sdl.c:10:
/usr/include/bits/alltypes.h:10:13: note: previous declaration of 'wchar_t' was here
10 | typedef int wchar_t;
| ^~~~~~~
Best regards
Heinrich
Edited by Heinrich Schuchardt