Skip to content

Commit 1d97f2e

Browse files
committed
Enable POSIX_FS on ESP32
1 parent c92bc4b commit 1d97f2e

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

mongoose.h

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,14 @@ extern "C" {
145145

146146
#define MG_PATH_MAX 128
147147

148+
#ifndef MG_ENABLE_POSIX_FS
149+
#define MG_ENABLE_POSIX_FS 1
150+
#endif
151+
152+
#ifndef MG_ENABLE_DIRLIST
153+
#define MG_ENABLE_DIRLIST 1
154+
#endif
155+
148156
#endif
149157

150158

@@ -3565,18 +3573,18 @@ struct mg_tcpip_driver_xmc7_data {
35653573

35663574
#define MG_TCPIP_DRIVER_INIT(mgr) \
35673575
do { \
3568-
static struct mg_tcpip_driver_xmc7_data driver_data_; \
3576+
static struct mg_tcpip_driver_xmc7_data driver_data_; \
35693577
static struct mg_tcpip_if mif_; \
35703578
driver_data_.mdc_cr = MG_DRIVER_MDC_CR; \
35713579
driver_data_.phy_addr = MG_TCPIP_PHY_ADDR; \
35723580
mif_.ip = MG_TCPIP_IP; \
35733581
mif_.mask = MG_TCPIP_MASK; \
35743582
mif_.gw = MG_TCPIP_GW; \
3575-
mif_.driver = &mg_tcpip_driver_xmc7; \
3583+
mif_.driver = &mg_tcpip_driver_xmc7; \
35763584
mif_.driver_data = &driver_data_; \
35773585
MG_SET_MAC_ADDRESS(mif_.mac); \
35783586
mg_tcpip_init(mgr, &mif_); \
3579-
MG_INFO(("Driver: xmc7, MAC: %M", mg_print_mac, mif_.mac)); \
3587+
MG_INFO(("Driver: xmc7, MAC: %M", mg_print_mac, mif_.mac)); \
35803588
} while (0)
35813589

35823590
#endif

src/arch_esp32.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,12 @@
2222

2323
#define MG_PATH_MAX 128
2424

25+
#ifndef MG_ENABLE_POSIX_FS
26+
#define MG_ENABLE_POSIX_FS 1
27+
#endif
28+
29+
#ifndef MG_ENABLE_DIRLIST
30+
#define MG_ENABLE_DIRLIST 1
31+
#endif
32+
2533
#endif

0 commit comments

Comments
 (0)