diff --git a/src/apps/httpd/httpd.c b/src/apps/httpd/httpd.c index 96ceacdc..4853eacc 100644 --- a/src/apps/httpd/httpd.c +++ b/src/apps/httpd/httpd.c @@ -102,7 +102,7 @@ #include /* atoi */ #include -#if LWIP_TCP +#if LWIP_TCP && LWIP_CALLBACK_API /** Minimum length for a valid HTTP/0.9 request: "GET /\r\n" -> 7 bytes */ #define MIN_REQ_LEN 7 @@ -2619,4 +2619,4 @@ http_set_cgi_handlers(const tCGI *cgis, int num_handlers) } #endif /* LWIP_HTTPD_CGI */ -#endif /* LWIP_TCP */ +#endif /* LWIP_TCP && LWIP_CALLBACK_API */ diff --git a/src/apps/lwiperf/lwiperf.c b/src/apps/lwiperf/lwiperf.c index 54bf2bca..efabe478 100644 --- a/src/apps/lwiperf/lwiperf.c +++ b/src/apps/lwiperf/lwiperf.c @@ -53,7 +53,7 @@ #include /* Currently, only TCP-over-IPv4 is implemented (does iperf support IPv6 anyway?) */ -#if LWIP_IPV4 && LWIP_TCP +#if LWIP_IPV4 && LWIP_TCP && LWIP_CALLBACK_API /** Specify the idle timeout (in seconds) after that the test fails */ #ifndef LWIPERF_TCP_MAX_IDLE_SEC @@ -658,4 +658,4 @@ lwiperf_abort(void* lwiperf_session) } } -#endif /* LWIP_IPV4 && LWIP_TCP */ +#endif /* LWIP_IPV4 && LWIP_TCP && LWIP_CALLBACK_API */ diff --git a/src/apps/mqtt/mqtt.c b/src/apps/mqtt/mqtt.c index 3d37ec73..a0e77b97 100644 --- a/src/apps/mqtt/mqtt.c +++ b/src/apps/mqtt/mqtt.c @@ -47,14 +47,16 @@ * Erik Andersson * */ -#include +#include "lwip/apps/mqtt.h" #include "lwip/timeouts.h" #include "lwip/ip_addr.h" #include "lwip/mem.h" #include "lwip/err.h" #include "lwip/pbuf.h" #include "lwip/tcp.h" -#include "lwip/apps/mqtt.h" +#include + +#if LWIP_TCP && LWIP_CALLBACK_API /** * MQTT_DEBUG: Default is off. @@ -1335,3 +1337,5 @@ mqtt_client_is_connected(mqtt_client_t *client) LWIP_ASSERT("mqtt_client_is_connected: client != NULL", client); return client->conn_state == MQTT_CONNECTED; } + +#endif /* LWIP_TCP && LWIP_CALLBACK_API */ diff --git a/src/include/lwip/apps/mqtt.h b/src/include/lwip/apps/mqtt.h index ee880405..34b230b8 100644 --- a/src/include/lwip/apps/mqtt.h +++ b/src/include/lwip/apps/mqtt.h @@ -39,8 +39,9 @@ #include "lwip/apps/mqtt_opts.h" #include "lwip/err.h" +#include "lwip/ip_addr.h" -#ifdef __cplusplus +#ifdef __cplusplus extern "C" { #endif @@ -236,7 +237,7 @@ err_t mqtt_sub_unsub(mqtt_client_t *client, const char *topic, u8_t qos, mqtt_re err_t mqtt_publish(mqtt_client_t *client, const char *topic, const void *payload, u16_t payload_length, u8_t qos, u8_t retain, mqtt_request_cb_t cb, void *arg); -#ifdef __cplusplus +#ifdef __cplusplus } #endif