diff --git a/libpsx/src/libc.c b/libpsx/src/libc.c index 59866f4..6576149 100644 --- a/libpsx/src/libc.c +++ b/libpsx/src/libc.c @@ -11,6 +11,7 @@ #include #include +#include #include #include #include @@ -164,12 +165,16 @@ static FILE *fopen_internal(const char *path, const char *mode, FILE *f) if(strncmp(path, "cdromL:", 7) == 0) { +#ifdef PSXSDK_CDROML_ENABLED s = malloc(1024); if(libc_get_transtbl_fname(path+7, s, 1024) == 0) return NULL; fd = open(s, fmode_to_desmode(mode)); +#else + return NULL; +#endif } else fd = open(path, fmode_to_desmode(mode));