[realtek-ambz2] Enable compilation of Arduino core
This commit is contained in:
@@ -13,6 +13,8 @@ extern "C" {
|
||||
#include <lwip/netif.h>
|
||||
}
|
||||
|
||||
#if LWIP_MDNS_RESPONDER
|
||||
|
||||
static std::vector<char *> services_name;
|
||||
static std::vector<char *> services;
|
||||
static std::vector<uint8_t> protos;
|
||||
@@ -81,7 +83,11 @@ static bool enableMDNS(struct netif *netif) {
|
||||
err_t ret = mdns_resp_add_netif(netif, hostName, 255);
|
||||
if (ret == ERR_OK) {
|
||||
LT_DM(MDNS, "mDNS started on netif %u, announcing it to network", netif->num);
|
||||
#if LWIP_VERSION_SIMPLE >= 20100
|
||||
mdns_resp_announce(netif);
|
||||
#else
|
||||
#warning "lwIP version older than 2.1.0, mdns_resp_announce() unavailable"
|
||||
#endif
|
||||
return true;
|
||||
} else {
|
||||
LT_DM(MDNS, "Cannot start mDNS on netif %u; ret=%d, errno=%d", netif->num, ret, errno);
|
||||
@@ -188,3 +194,5 @@ bool mDNS::addServiceTxtImpl(const char *service, uint8_t proto, const char *ite
|
||||
MDNSResponder MDNS;
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -25,6 +25,7 @@ using std::min;
|
||||
#include <api/ArduinoAPI.h>
|
||||
#ifdef __cplusplus
|
||||
#include <LT.h>
|
||||
using namespace arduino;
|
||||
#endif
|
||||
|
||||
// Include family-specific code
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
// clang-format on
|
||||
#endif
|
||||
|
||||
// lwIP version as a decimal number, with 2 digits for each part (major, minor, patch)
|
||||
#define LWIP_VERSION_SIMPLE (LWIP_VERSION_MAJOR * 10000 + LWIP_VERSION_MINOR * 100 + LWIP_VERSION_REVISION)
|
||||
|
||||
// remove family-defined debugging options (use lwIP defaults, or user-defined)
|
||||
#undef ETHARP_DEBUG
|
||||
#undef NETIF_DEBUG
|
||||
|
||||
Reference in New Issue
Block a user