Skip to content

Commit 770bc04

Browse files
committed
include guard
1 parent b340454 commit 770bc04

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/ArduinoHttpClient.h

+6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
#ifndef ArduinoHttpClient_h
66
#define ArduinoHttpClient_h
77

8+
#if defined(ESP_IDF_VERSION)
9+
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)
10+
#define HAS_ESP_IDF_5
11+
#endif
12+
#endif
13+
814
#include "HttpClient.h"
915
#include "WebSocketClient.h"
1016
#include "URLEncoder.h"

src/HttpClient.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ class HttpClient : public Client
313313
// Inherited from Client
314314
virtual int connect(IPAddress ip, uint16_t port) { return iClient->connect(ip, port); };
315315
virtual int connect(const char *host, uint16_t port) { return iClient->connect(host, port); };
316-
#ifdef ARDUINO_ARCH_ESP32
316+
#ifdef HAS_ESP_IDF_5
317317
virtual int connect(const char *host, uint16_t port, int32_t timeout){ return iClient->connect(host, port, timeout); };
318318
virtual int connect(IPAddress ip, uint16_t port, int32_t timeout){ return iClient->connect(ip, port, timeout); };
319319
#endif

0 commit comments

Comments
 (0)