Added SDL_VARIABLE_LENGTH_ARRAY so this #ifdef is localized to one place.

--HG--
extra : rebase_source : d3e161c0ca22ae672ad540a4febef47e141e37c1
This commit is contained in:
Ryan C. Gordon 2016-12-06 02:20:58 -05:00
parent 5ab2eefa0d
commit a43f4155bb
2 changed files with 10 additions and 5 deletions

View file

@ -105,11 +105,7 @@ typedef struct SDL_AudioDeviceItem
{
void *handle;
struct SDL_AudioDeviceItem *next;
#if (defined(__GNUC__) && (__GNUC__ <= 2))
char name[1]; /* actually variable length. */
#else
char name[];
#endif
char name[SDL_VARIABLE_LENGTH_ARRAY];
} SDL_AudioDeviceItem;