diff options
| author | Dirk Ziegelmeier <dirk@ziegelmeier.net> | 2016-11-30 07:43:59 +0100 |
|---|---|---|
| committer | Dirk Ziegelmeier <dirk@ziegelmeier.net> | 2016-11-30 07:43:59 +0100 |
| commit | 182d7c138a5b845c74b7d364ee07af6105d8e786 (patch) | |
| tree | 84639c8fababb1b5de31dc7ebe850ade473b70e5 | |
| parent | 47fd67a35c1fac5e3bf085f4a276c9fec0743de7 (diff) | |
| download | lwip-182d7c138a5b845c74b7d364ee07af6105d8e786.tar.gz | |
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
| -rw-r--r-- | src/core/inet_chksum.c | 1 | ||||
| -rw-r--r-- | src/include/lwip/api.h | 3 | ||||
| -rw-r--r-- | src/include/lwip/arch.h | 2 | ||||
| -rw-r--r-- | src/include/lwip/mem.h | 3 | ||||
| -rw-r--r-- | src/include/lwip/netdb.h | 3 | ||||
| -rw-r--r-- | src/include/lwip/priv/api_msg.h | 3 | ||||
| -rw-r--r-- | src/include/lwip/sockets.h | 2 |
7 files changed, 7 insertions, 10 deletions
diff --git a/src/core/inet_chksum.c b/src/core/inet_chksum.c index 8028952..917f3e4 100644 --- a/src/core/inet_chksum.c +++ b/src/core/inet_chksum.c @@ -51,7 +51,6 @@ #include "lwip/def.h" #include "lwip/ip_addr.h" -#include <stddef.h> #include <string.h> #ifndef LWIP_CHKSUM diff --git a/src/include/lwip/api.h b/src/include/lwip/api.h index d139453..516bd16 100644 --- a/src/include/lwip/api.h +++ b/src/include/lwip/api.h @@ -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" diff --git a/src/include/lwip/arch.h b/src/include/lwip/arch.h index 473e4a4..2792394 100644 --- a/src/include/lwip/arch.h +++ b/src/include/lwip/arch.h @@ -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 diff --git a/src/include/lwip/mem.h b/src/include/lwip/mem.h index e4f6a64..ff208d2 100644 --- a/src/include/lwip/mem.h +++ b/src/include/lwip/mem.h @@ -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 diff --git a/src/include/lwip/netdb.h b/src/include/lwip/netdb.h index 21688c6..d3d15df 100644 --- a/src/include/lwip/netdb.h +++ b/src/include/lwip/netdb.h @@ -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" diff --git a/src/include/lwip/priv/api_msg.h b/src/include/lwip/priv/api_msg.h index ad38345..f12b8b7 100644 --- a/src/include/lwip/priv/api_msg.h +++ b/src/include/lwip/priv/api_msg.h @@ -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" diff --git a/src/include/lwip/sockets.h b/src/include/lwip/sockets.h index 9d76776..2522056 100644 --- a/src/include/lwip/sockets.h +++ b/src/include/lwip/sockets.h @@ -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" |
