compile native on OSX

This commit is contained in:
proddy
2024-08-02 12:20:09 +02:00
parent de582f2f61
commit 3159561cfb
6 changed files with 6 additions and 9 deletions

View File

@@ -47,7 +47,7 @@ the LICENSE file.
#include <mutex> // NOLINT [build/c++11]
#define EMC_SEMAPHORE_TAKE() mtx.lock();
#define EMC_SEMAPHORE_GIVE() mtx.unlock();
#elif defined(_WIN32)
#elif defined(_WIN32) || defined(__APPLE__)
#include <Arduino.h>
#define EMC_SEMAPHORE_TAKE()
#define EMC_SEMAPHORE_GIVE()

View File

@@ -6,8 +6,6 @@ For a copy, see <https://opensource.org/licenses/MIT> or
the LICENSE file.
*/
#if defined(__linux__) || defined(_WIN32)
#include "ClientPosixIPAddress.h"
IPAddress::IPAddress()
@@ -28,5 +26,3 @@ IPAddress::IPAddress(uint32_t address)
IPAddress::operator uint32_t() {
return _address;
}
#endif

View File

@@ -120,7 +120,7 @@ espMqttClient::espMqttClient()
, _client() {
_transport = &_client;
}
#elif defined(_WIN32)
#elif defined(_WIN32) || defined(__APPLE__)
// Windows
espMqttClient::espMqttClient()
: MqttClientSetup(espMqttClientTypes::UseInternalTask::NO) {

View File

@@ -76,7 +76,7 @@ class espMqttClient : public MqttClientSetup<espMqttClient> {
protected:
espMqttClientInternals::ClientPosix _client;
};
#elif defined(_WIN32)
#elif defined(_WIN32) || defined(__APPLE__)
class espMqttClient : public MqttClientSetup<espMqttClient> {
public:
espMqttClient();