diff --git a/include/SDL_rwops.h b/include/SDL_rwops.h index 69ef271ec..f6e374bee 100644 --- a/include/SDL_rwops.h +++ b/include/SDL_rwops.h @@ -131,6 +131,9 @@ extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFile(const char *file, #ifdef HAVE_STDIO_H extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(FILE * fp, SDL_bool autoclose); +#else +extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP(void * fp, + SDL_bool autoclose); #endif extern DECLSPEC SDL_RWops *SDLCALL SDL_RWFromMem(void *mem, int size); diff --git a/src/file/SDL_rwops.c b/src/file/SDL_rwops.c index 05c296112..baa8a07b1 100644 --- a/src/file/SDL_rwops.c +++ b/src/file/SDL_rwops.c @@ -497,6 +497,13 @@ SDL_RWFromFP(FILE * fp, SDL_bool autoclose) } return (rwops); } +#else +SDL_RWops * +SDL_RWFromFP(void * fp, SDL_bool autoclose) +{ + SDL_SetError("SDL not compiled with stdio support"); + return NULL; +} #endif /* HAVE_STDIO_H */ SDL_RWops *