diff --git a/src/video/SDL_gamma.c b/src/video/SDL_gamma.c index e48da5e63..14c4d8b93 100644 --- a/src/video/SDL_gamma.c +++ b/src/video/SDL_gamma.c @@ -26,14 +26,8 @@ #ifdef HAVE_MATH_H #include /* Used for calculating gamma ramps */ -#endif - -#include "SDL_error.h" -#include "SDL_stdlib.h" -#include "SDL_string.h" -#include "SDL_sysvideo.h" - -#ifndef HAVE_MATH_H +#else +/* Math routines from uClibc: http://www.uclibc.org */ #include "math_private.h" #include "e_sqrt.h" #include "e_pow.h" @@ -42,6 +36,12 @@ #define log(x) __ieee754_log(x) #endif +#include "SDL_error.h" +#include "SDL_stdlib.h" +#include "SDL_string.h" +#include "SDL_sysvideo.h" + + static void CalculateGammaRamp(float gamma, Uint16 *ramp) { int i;