Add #include <stddef.h> to a central place (arch.h) instead of #including it in several other files throughout lwip since size_t is needed in many places

See http://lwip.100.n7.nabble.com/Issue-in-arch-h-for-lwIP-2-0-0-td27948.html
This commit is contained in:
Dirk Ziegelmeier 2016-11-30 07:43:59 +01:00
parent 47fd67a35c
commit 182d7c138a
7 changed files with 7 additions and 10 deletions

View File

@ -51,7 +51,6 @@
#include "lwip/def.h"
#include "lwip/ip_addr.h"
#include <stddef.h>
#include <string.h>
#ifndef LWIP_CHKSUM

View File

@ -43,8 +43,7 @@
/* Note: Netconn API is always available when sockets are enabled -
* sockets are implemented on top of them */
#include <stddef.h> /* for size_t */
#include "lwip/arch.h"
#include "lwip/netbuf.h"
#include "lwip/sys.h"
#include "lwip/ip_addr.h"

View File

@ -47,6 +47,8 @@
#include "arch/cc.h"
#include <stddef.h> /* for size_t */
/** Define this to 1 in arch/cc.h of your port if your compiler does not provide
* the stdint.h header. This cannot be \#defined in lwipopts.h since
* this is not an option of lwIP itself, but an option of the lwIP port

View File

@ -45,7 +45,8 @@ extern "C" {
#if MEM_LIBC_MALLOC
#include <stddef.h> /* for size_t */
#include "lwip/arch.h"
typedef size_t mem_size_t;
#define MEM_SIZE_F SZT_F

View File

@ -38,8 +38,7 @@
#if LWIP_DNS && LWIP_SOCKET
#include <stddef.h> /* for size_t */
#include "lwip/arch.h"
#include "lwip/inet.h"
#include "lwip/sockets.h"

View File

@ -43,8 +43,7 @@
/* Note: Netconn API is always available when sockets are enabled -
* sockets are implemented on top of them */
#include <stddef.h> /* for size_t */
#include "lwip/arch.h"
#include "lwip/ip_addr.h"
#include "lwip/err.h"
#include "lwip/sys.h"

View File

@ -43,8 +43,6 @@
#if LWIP_SOCKET /* don't build if not configured for use in lwipopts.h */
#include <stddef.h> /* for size_t */
#include "lwip/ip_addr.h"
#include "lwip/err.h"
#include "lwip/inet.h"