diff --git a/mongoose.c b/mongoose.c index fd009643..d75ecd65 100644 --- a/mongoose.c +++ b/mongoose.c @@ -3711,6 +3711,7 @@ struct mg_str mg_url_pass(const char *url) { #endif +#if MG_ENABLE_FS size_t mg_file_size(const char *path) { #if MG_ARCH == MG_ARCH_FREERTOS struct FF_STAT st; @@ -3781,6 +3782,7 @@ void mg_random(void *buf, size_t len) { } if (fp != NULL) fclose(fp); } +#endif bool mg_globmatch(const char *s1, int n1, const char *s2, int n2) { int i = 0, j = 0, ni = 0, nj = 0; diff --git a/src/util.c b/src/util.c index 71edd895..443dc6a5 100644 --- a/src/util.c +++ b/src/util.c @@ -1,5 +1,6 @@ #include "util.h" +#if MG_ENABLE_FS size_t mg_file_size(const char *path) { #if MG_ARCH == MG_ARCH_FREERTOS struct FF_STAT st; @@ -70,6 +71,7 @@ void mg_random(void *buf, size_t len) { } if (fp != NULL) fclose(fp); } +#endif bool mg_globmatch(const char *s1, int n1, const char *s2, int n2) { int i = 0, j = 0, ni = 0, nj = 0;