-
Notifications
You must be signed in to change notification settings - Fork 13.3k
error: 'time_t' has not been declared in HardwareSerial.h #5644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
You are using core 2.4.0. Latest git version is 2.5.0?! |
@pat1 Core 2.4.0 issues are no longer supported. Please upgrade to 2.5.0-beta2 and if the issue persists please re-open the issue and complete all the required information from the template. Please also close this issue as it is no longer relevant. |
if I say that it is the last git version it is.
|
Noboby is questioning your sincerity. |
[pat1@localhost bin]$ ./xtensa-lx106-elf-c++ --version I get the same after cd tools; python ./get.py The problem is not the toolchain; the use of time_t is possible only after the appropriate #include |
Ah, this is useful info to help us understand your issue, |
in the last git version using hardware serial I get at compile time:
packages/esp8266/hardware/esp8266/2.4.0/cores/esp8266/HardwareSerial.h:210:34: error: 'time_t' has not been declared
unsigned long detectBaudrate(time_t timeoutMillis);
this little patch solve the problem:
diff --git a/cores/esp8266/HardwareSerial.h b/cores/esp8266/HardwareSerial.h
index ce9a1c5..5f083f7 100644
--- a/cores/esp8266/HardwareSerial.h
+++ b/cores/esp8266/HardwareSerial.h
@@ -30,6 +30,7 @@
#include <inttypes.h>
#include "Stream.h"
#include "uart.h"
+#include "time.h"
enum SerialConfig {
SERIAL_5N1 = UART_5N1,
The text was updated successfully, but these errors were encountered: