Skip to content

demos: fix SDL include order

SDL has to be included before any possible system header includes, as it defines some feature test macros like _DARWIN_C_SOURCE, which is required to make memset_pattern4 available. But if a system header is included before already, it did not have the needed define and the function will be missing, leading to an error like:

SDL2/SDL_stdinc.h:434:5: error: implicit declaration of function 'memset_pattern4' is invalid in C99

The simplest fix for this is to just swap the includes order.

Merge request reports