Skip to content

Commit ad7f9e6

Browse files
NeroReflexDenis Benato
authored andcommitted
Prevent compilation failure due to undefined Timer struct
Add a forward declaration for the implementation-dependant Timer struct to avoid build failures on the ESP32. Signed-off-by: Denis Benato <[email protected]>
1 parent de1c690 commit ad7f9e6

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

MQTTClient-C/src/MQTTClient.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,13 @@ typedef struct Network
7474

7575
/* The Timer structure must be defined in the platform specific header,
7676
* and have the following functions to operate on it. */
77-
extern void TimerInit(Timer*);
78-
extern char TimerIsExpired(Timer*);
79-
extern void TimerCountdownMS(Timer*, unsigned int);
80-
extern void TimerCountdown(Timer*, unsigned int);
81-
extern int TimerLeftMS(Timer*);
77+
struct Timer;
78+
79+
extern void TimerInit(struct Timer*);
80+
extern char TimerIsExpired(struct Timer*);
81+
extern void TimerCountdownMS(struct Timer*, unsigned int);
82+
extern void TimerCountdown(struct Timer*, unsigned int);
83+
extern int TimerLeftMS(struct Timer*);
8284

8385
typedef struct MQTTMessage
8486
{

0 commit comments

Comments
 (0)