Ok I think I unsderstand what's happening, here's the include in gfx_opengl.h:
#if defined (SDL_BACKEND) && !defined(__amigaos4__)
#include <SDL\SDL_opengl.h>
#undef ARRAYSIZE
#else
#ifndef USE_GLES
#include <GL/gl.h>
#include <GL/glu.h>
#else
#include <GLES/gl.h>
#include...