Skip to content

error: 'time_t' has not been declared in HardwareSerial.h #5644

Closed
@pat1

Description

@pat1

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,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions