Skip to content

Commit c92bc4b

Browse files
authored
Merge pull request #3158 from cesanta/posiz
Redefine mkdir only if MG_ENABLE_POSIX_FS==0
2 parents 650cafa + 6a3e1e4 commit c92bc4b

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

mongoose.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,11 +211,14 @@ static inline void *mg_calloc(size_t cnt, size_t size) {
211211
return p;
212212
}
213213

214+
#if MG_ENABLE_POSIX_FS
215+
#else
214216
#define mkdir(a, b) mg_mkdir(a, b)
215217
static inline int mg_mkdir(const char *path, mode_t mode) {
216218
(void) path, (void) mode;
217219
return -1;
218220
}
221+
#endif
219222

220223
#endif // MG_ARCH == MG_ARCH_FREERTOS
221224

src/arch_freertos.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,13 @@ static inline void *mg_calloc(size_t cnt, size_t size) {
3737
return p;
3838
}
3939

40+
#if MG_ENABLE_POSIX_FS
41+
#else
4042
#define mkdir(a, b) mg_mkdir(a, b)
4143
static inline int mg_mkdir(const char *path, mode_t mode) {
4244
(void) path, (void) mode;
4345
return -1;
4446
}
47+
#endif
4548

4649
#endif // MG_ARCH == MG_ARCH_FREERTOS

tutorials/http/device-dashboard/net.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,6 @@ void web_init(struct mg_mgr *mgr) {
254254
s_settings.device_name = strdup("My Device");
255255
mg_http_listen(mgr, HTTP_URL, fn, NULL);
256256
mg_http_listen(mgr, HTTPS_URL, fn, NULL);
257-
mg_timer_add(mgr, 3600 * 1000, MG_TIMER_RUN_NOW | MG_TIMER_REPEAT,
257+
mg_timer_add(mgr, 10 * 1000, MG_TIMER_RUN_NOW | MG_TIMER_REPEAT,
258258
timer_sntp_fn, mgr);
259259
}

tutorials/tcpip/tap-driver/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ int main(int argc, char *argv[]) {
112112
struct mg_tcpip_driver driver = {.tx = tap_tx, .poll = tap_poll, .rx = tap_rx};
113113
struct mg_tcpip_if mif = {.driver = &driver,
114114
.driver_data = &fd,
115-
.enable_req_dns = true,
115+
.enable_req_dns = false,
116116
.enable_req_sntp = true,
117117
.fn = mif_fn};
118118
sscanf(mac, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", &mif.mac[0], &mif.mac[1],

0 commit comments

Comments
 (0)