Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed bug 3832 - Compilation error with "IMG_jpg.c" on Mac OS X
Holger Schemel Summary: Error when compiling file "IMG_jpg.c" on Mac OS X. This compilation error may possibly only occur in certain cases (maybe depending on what "./configure" detected); however, it will always occur if the first "#if" (at the very top of the file) results in the corresponding #if/#endif block to be skipped. In this case, the remaining part of the source file (starting with "#define SAVE_JPG" / "#ifdef SAVE_JPG") will always be compiled, but has no SDL stuff defined (like "SDL_Surface" etc.), because "SDL_image.h" was never included in this case, and will therefore fail with a compiler error. The attached patch simply moves that first "#if" below the "#include"s, which fixes the problem.
- Loading branch information