--- glhack-1.2.orig/win/gl/gl_image.c +++ glhack-1.2/win/gl/gl_image.c @@ -486,7 +486,11 @@ /* set error handling since we are using the setjmp/longjmp method * (this is the normal method of doing things with libpng). */ +#if PNG_LIBPNG_VER_MAJOR >= 1 && PNG_LIBPNG_VER_MINOR >= 4 + if ( setjmp(png_jmpbuf(png_ptr)) ) +#else if (setjmp(png_ptr->jmpbuf)) +#endif { sdlgl_warning("Problem within LibPNG (unknown)\n"); goto failed;