Update LwIP to 2.1.0.rc1

This release candidate suppresses the remaining build warnings.

Ref #2335
This commit is contained in:
Ehmry - 2018-07-20 12:10:12 +02:00 committed by Christian Helmuth
parent 9b31aac1de
commit bf8b52ec3a
9 changed files with 83 additions and 28 deletions

View File

@ -30,17 +30,31 @@ typedef unsigned long size_t;
typedef long ptrdiff_t; typedef long ptrdiff_t;
#endif /* LWIP_NO_STDDEF_H */ #endif /* LWIP_NO_STDDEF_H */
#ifndef LWIP_NO_STDINT_H #ifndef LWIP_NO_STDINT_H
#define LWIP_NO_STDINT_H 1 #define LWIP_NO_STDINT_H 1
typedef genode_uint8_t u8_t; #define LWIP_HAVE_INT64
typedef genode_int8_t s8_t; typedef genode_uint8_t uint8_t;
typedef genode_uint16_t u16_t; typedef genode_int8_t int8_t;
typedef genode_int16_t s16_t; typedef genode_uint16_t uint16_t;
typedef genode_uint32_t u32_t; typedef genode_int16_t int16_t;
typedef genode_int32_t s32_t; typedef genode_uint32_t uint32_t;
typedef genode_int32_t int32_t;
typedef genode_uint64_t uint64_t;
typedef genode_int64_t int64_t;
typedef unsigned long uintptr_t;
typedef uint8_t u8_t;
typedef int8_t s8_t;
typedef uint16_t u16_t;
typedef int16_t s16_t;
typedef uint32_t u32_t;
typedef int32_t s32_t;
typedef uint64_t u64_t;
typedef int64_t s64_t;
typedef uintptr_t mem_ptr_t;
typedef unsigned long mem_ptr_t; #ifndef NULL
#define NULL (uintptr_t)0
#endif
#endif /* LWIP_NO_STDINT_H */ #endif /* LWIP_NO_STDINT_H */
@ -78,6 +92,11 @@ void lwip_platform_assert(char const* msg, char const *file, int line);
#endif #endif
#ifndef LWIP_NO_CTYPE_H
#define LWIP_NO_CTYPE_H 1
#endif
#define LWIP_SKIP_PACKING_CHECK 1 #define LWIP_SKIP_PACKING_CHECK 1
#define PACK_STRUCT_FIELD(x) x #define PACK_STRUCT_FIELD(x) x
#define PACK_STRUCT_STRUCT #define PACK_STRUCT_STRUCT
@ -88,8 +107,13 @@ void lwip_platform_assert(char const* msg, char const *file, int line);
#define BYTE_ORDER LITTLE_ENDIAN #define BYTE_ORDER LITTLE_ENDIAN
#endif /* BYTE_ORDER */ #endif /* BYTE_ORDER */
/*
* XXX: Should these be inlined?
*/
void genode_memcpy( void *dst, const void *src, size_t len);
void *genode_memmove(void *dst, const void *src, size_t len);
void genode_free(void *ptr); void genode_free(void *ptr);
void *genode_malloc(unsigned long size); void *genode_malloc(unsigned long size);
void *genode_calloc(unsigned long number, unsigned long size); void *genode_calloc(unsigned long number, unsigned long size);

View File

@ -73,8 +73,13 @@ extern "C" {
#define MEMP_NUM_SYS_TIMEOUT 16 #define MEMP_NUM_SYS_TIMEOUT 16
#define MEMP_NUM_TCP_PCB 128 #define MEMP_NUM_TCP_PCB 128
void genode_memcpy(void * dst, const void *src, unsigned long size); #ifndef MEMCPY
#define MEMCPY(dst,src,len) genode_memcpy(dst,src,len) #define MEMCPY(dst,src,len) genode_memcpy(dst,src,len)
#endif
#ifndef MEMMOVE
#define MEMMOVE(dst,src,len) genode_memmove(dst,src,len)
#endif
/******************** /********************
** Debug settings ** ** Debug settings **

View File

@ -5,7 +5,7 @@
# #
LWIP_PORT_DIR := $(call select_from_ports,lwip) LWIP_PORT_DIR := $(call select_from_ports,lwip)
LWIPDIR := $(LWIP_PORT_DIR)/src/lib/lwip/lwip-2.0.3/src LWIPDIR := $(LWIP_PORT_DIR)/src/lib/lwip/src
-include $(LWIPDIR)/Filelists.mk -include $(LWIPDIR)/Filelists.mk
@ -33,9 +33,5 @@ INC_DIR += $(REP_DIR)/include/lwip \
$(REP_DIR)/src/lib/lwip/include $(REP_DIR)/src/lib/lwip/include
vpath %.cc $(REP_DIR)/src/lib/lwip/platform vpath %.cc $(REP_DIR)/src/lib/lwip/platform
vpath %.c $(LWIPDIR)/core vpath %.c $(sort $(dir \
vpath %.c $(LWIPDIR)/core/ipv4 $(COREFILES) $(CORE4FILES) $(CORE6FILES) $(NETIFFILES)))
vpath %.c $(LWIPDIR)/core/ipv6
vpath %.c $(LWIPDIR)/netif
CC_CXX_WARN_STRICT =

View File

@ -1 +1 @@
1ac3301a29dcf5f4fc3981fb4338578c7d5d7fe5 7b106db24a8a49b863999c90eb5943d472d325e1

View File

@ -1,12 +1,15 @@
LICENSE := BSD LICENSE := BSD
VERSION := 2.0.3 VERSION := 2_1_0_RC1
DOWNLOADS := lwip.archive DOWNLOADS := lwip.archive
URL(lwip) := http://download.savannah.nongnu.org/releases/lwip/lwip-$(VERSION).zip URL(lwip) := http://git.savannah.nongnu.org/cgit/lwip.git/snapshot/lwip-STABLE-$(VERSION).tar.gz
SHA(lwip) := 1488829ca48890cc7e5e86c5e76a74b32a1bc9ac8dc01b2177b3a937650e9730 SHA(lwip) := 731c1bc74e9a73daebe9ef83b602ce35f878818eff06dc33785248e9de032666
DIR(lwip) := src/lib/lwip DIR(lwip) := src/lib/lwip
UNPACKED_DIR := src/lib/lwip/lwip-$(VERSION) UNPACKED_DIR := src/lib/lwip
PATCHES := $(wildcard $(REP_DIR)/src/lib/lwip/*.patch)
PATCH_OPT := -p1 -d src/lib/lwip
DIRS := \ DIRS := \
include/lwip/lwip \ include/lwip/lwip \

View File

@ -19,4 +19,4 @@ $(MIRROR_FROM_PORT_DIR):
cp -r $(PORT_DIR)/$@ $@ cp -r $(PORT_DIR)/$@ $@
LICENSE: LICENSE:
cp $(PORT_DIR)/src/lib/lwip/lwip-*/COPYING $@ cp $(PORT_DIR)/src/lib/lwip/COPYING $@

View File

@ -0,0 +1,15 @@
#ifndef _LWIP__INCLUDE__STDLIB_H_
#define _LWIP__INCLUDE__STDLIB_H_
/**
* Simple atoi for LwIP purposes
*/
static inline int atoi(char const *s)
{
int n = 0;
while ('0' <= *s && *s <= '9')
n = 10*n - (*s++ - '0');
return n;
}
#endif

View File

@ -0,0 +1,12 @@
diff --git a/src/core/def.c b/src/core/def.c
index 9da36fee..58edce6f 100644
--- a/src/core/def.c
+++ b/src/core/def.c
@@ -235,6 +235,6 @@ lwip_itoa(char *result, size_t bufsize, int number)
return;
}
/* move from temporary buffer to output buffer (sign is not moved) */
- memmove(res, tmp, (size_t)((result + bufsize) - tmp));
+ MEMMOVE(res, tmp, (size_t)((result + bufsize) - tmp));
}
#endif

View File

@ -34,9 +34,6 @@ namespace Lwip {
static Genode::Allocator *_heap; static Genode::Allocator *_heap;
/**
* XXX: can this be replaced with an alarm?
*/
struct Sys_timer struct Sys_timer
{ {
void check_timeouts(Genode::Duration) { void check_timeouts(Genode::Duration) {
@ -98,8 +95,11 @@ extern "C" {
u32_t sys_now(void) { u32_t sys_now(void) {
return Lwip::_sys_timer->timer.curr_time().trunc_to_plain_ms().value; } return Lwip::_sys_timer->timer.curr_time().trunc_to_plain_ms().value; }
void genode_memcpy(void * dst, const void *src, unsigned long size) { void genode_memcpy(void *dst, const void *src, size_t len) {
Genode::memcpy(dst, src, size); } Genode::memcpy(dst, src, len); }
void *genode_memmove(void *dst, const void *src, size_t len) {
return Genode::memmove(dst, src, len); }
int memcmp(const void *b1, const void *b2, ::size_t len) { int memcmp(const void *b1, const void *b2, ::size_t len) {
return Genode::memcmp(b1, b2, len); } return Genode::memcmp(b1, b2, len); }