fix missing standard includes

These were a problem only if arch.h does not include them.

Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
This commit is contained in:
Simon Goldschmidt 2018-10-23 07:46:13 +02:00
parent 06cc825431
commit ef02b1dc20
7 changed files with 15 additions and 9 deletions

View File

@ -34,6 +34,7 @@
/* C runtime includes */
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>

View File

@ -39,8 +39,8 @@ lwiperf_report(void *arg, enum lwiperf_report_type report_type,
LWIP_UNUSED_ARG(local_addr);
LWIP_UNUSED_ARG(local_port);
printf("IPERF report: type=%d, remote: %s:%d, total bytes: %"U32_F", duration in ms: %"U32_F", kbits/s: %"U32_F"\n",
(int)report_type, ipaddr_ntoa(remote_addr), (int)remote_port, bytes_transferred, ms_duration, bandwidth_kbitpsec);
LWIP_PLATFORM_DIAG(("IPERF report: type=%d, remote: %s:%d, total bytes: %"U32_F", duration in ms: %"U32_F", kbits/s: %"U32_F"\n",
(int)report_type, ipaddr_ntoa(remote_addr), (int)remote_port, bytes_transferred, ms_duration, bandwidth_kbitpsec));
}
void

View File

@ -67,8 +67,8 @@ mqtt_incoming_data_cb(void *arg, const u8_t *data, u16_t len, u8_t flags)
const struct mqtt_connect_client_info_t* client_info = (const struct mqtt_connect_client_info_t*)arg;
LWIP_UNUSED_ARG(data);
printf("MQTT client \"%s\" data cb: len %d, flags %d\n", client_info->client_id,
(int)len, (int)flags);
LWIP_PLATFORM_DIAG(("MQTT client \"%s\" data cb: len %d, flags %d\n", client_info->client_id,
(int)len, (int)flags));
}
static void
@ -76,8 +76,8 @@ mqtt_incoming_publish_cb(void *arg, const char *topic, u32_t tot_len)
{
const struct mqtt_connect_client_info_t* client_info = (const struct mqtt_connect_client_info_t*)arg;
printf("MQTT client \"%s\" publish cb: topic %s, len %d\n", client_info->client_id,
topic, (int)tot_len);
LWIP_PLATFORM_DIAG(("MQTT client \"%s\" publish cb: topic %s, len %d\n", client_info->client_id,
topic, (int)tot_len));
}
static void
@ -85,7 +85,7 @@ mqtt_request_cb(void *arg, err_t err)
{
const struct mqtt_connect_client_info_t* client_info = (const struct mqtt_connect_client_info_t*)arg;
printf("MQTT client \"%s\" request cb: err %d\n", client_info->client_id, (int)err);
LWIP_PLATFORM_DIAG(("MQTT client \"%s\" request cb: err %d\n", client_info->client_id, (int)err));
}
static void
@ -94,7 +94,7 @@ mqtt_connection_cb(mqtt_client_t *client, void *arg, mqtt_connection_status_t st
const struct mqtt_connect_client_info_t* client_info = (const struct mqtt_connect_client_info_t*)arg;
LWIP_UNUSED_ARG(client);
printf("MQTT client \"%s\" connection cb: status %d\n", client_info->client_id, (int)status);
LWIP_PLATFORM_DIAG(("MQTT client \"%s\" connection cb: status %d\n", client_info->client_id, (int)status));
if (status == MQTT_CONNECT_ACCEPTED) {
mqtt_sub_unsub(client,

View File

@ -41,6 +41,8 @@
#include "pppos_example.h"
#include <stdio.h>
#if PPPOS_SUPPORT
static sio_fd_t ppp_sio;
static ppp_pcb *ppp;

View File

@ -48,7 +48,7 @@ sntp_set_system_time(u32_t sec)
#endif
strftime(buf, sizeof(buf), "%d.%m.%Y %H:%M:%S", &current_time_val);
printf("SNTP time: %s\n", buf);
LWIP_PLATFORM_DIAG(("SNTP time: %s\n", buf));
}
void

View File

@ -51,6 +51,8 @@
#include "lwip/mem.h"
#include "lwip/init.h"
#include <stdio.h>
/** This string is passed in the HTTP header as "User-Agent: " */
#ifndef ALTCP_PROXYCONNECT_CLIENT_AGENT
#define ALTCP_PROXYCONNECT_CLIENT_AGENT "lwIP/" LWIP_VERSION_STRING " (http://savannah.nongnu.org/projects/lwip)"

View File

@ -55,6 +55,7 @@
#include "lwip/init.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#if LWIP_TCP && LWIP_CALLBACK_API