From 10c274c7742f04ab01808c6d42a92de8a664ef31 Mon Sep 17 00:00:00 2001
From: Deomid Ryabkov <rojer@cesanta.com>
Date: Wed, 10 Jan 2018 12:59:40 +0300
Subject: [PATCH] STM32 Ethernet support

AWS MQTT connection works

Also fixes https://github.com/mongoose-os-libs/ethernet/issues/1 (because why not).

PUBLISHED_FROM=7b0fa8894f2127335d075f2a97fcd37b932006b2
---
 mongoose.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/mongoose.h b/mongoose.h
index 742deab67..f8767404e 100644
--- a/mongoose.h
+++ b/mongoose.h
@@ -1639,6 +1639,9 @@ char *inet_ntoa(struct in_addr in);
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <sys/types.h>
+#include <unistd.h>
+#include <dirent.h>
+
 #include <stm32_sdk_hal.h>
 
 #define to64(x) strtoll(x, NULL, 10)
@@ -1655,8 +1658,6 @@ typedef struct stat cs_stat_t;
 #define MG_ENABLE_FILESYSTEM 1
 #endif
 
-#define CS_DEFINE_DIRENT
-
 #endif /* CS_PLATFORM == CS_P_STM32 */
 #endif /* CS_COMMON_PLATFORMS_PLATFORM_STM32_H_ */
 #ifdef MG_MODULE_LINES
-- 
GitLab