diff options
author | Vijay Kumar Banerjee <vijay@rtems.org> | 2021-07-06 12:49:31 -0600 |
---|---|---|
committer | Vijay Kumar Banerjee <vijay@rtems.org> | 2021-07-06 12:49:31 -0600 |
commit | fbe7ebd1ac39cdc25c331ede84cc5a45f8c56753 (patch) | |
tree | e3053ddfcf928aedab8826650d698a10fc03b19e /lwip/src | |
parent | 8934b44c09959ba7e2960626d49450bd5c62a208 (diff) |
lwip/src: Add rtems compatibilitydevel
Diffstat (limited to 'lwip/src')
-rw-r--r-- | lwip/src/api/rtems_lwip_io.c | 4 | ||||
-rw-r--r-- | lwip/src/core/memp.c | 2 | ||||
-rw-r--r-- | lwip/src/core/tcp.c | 2 | ||||
-rw-r--r-- | lwip/src/include/lwip/opt.h | 2 | ||||
-rw-r--r-- | lwip/src/include/lwip/sockets.h | 7 |
5 files changed, 14 insertions, 3 deletions
diff --git a/lwip/src/api/rtems_lwip_io.c b/lwip/src/api/rtems_lwip_io.c index b3ea5a2..d163405 100644 --- a/lwip/src/api/rtems_lwip_io.c +++ b/lwip/src/api/rtems_lwip_io.c @@ -57,7 +57,7 @@ static rtems_recursive_mutex rtems_lwip_mutex = void rtems_lwip_semaphore_obtain( void ) { - rtems_recursive_mutex_lock( &rtems_lwip_mutex ); + rtems_recursive_mutex_lock( &rtems_lwip_mutex ); } /* @@ -65,7 +65,7 @@ void rtems_lwip_semaphore_obtain( void ) */ void rtems_lwip_semaphore_release( void ) { - rtems_recursive_mutex_unlock( &rtems_lwip_mutex ); + rtems_recursive_mutex_unlock( &rtems_lwip_mutex ); } static inline int rtems_lwip_iop_to_lwipfd( rtems_libio_t *iop ) diff --git a/lwip/src/core/memp.c b/lwip/src/core/memp.c index 352ce5a..1917826 100644 --- a/lwip/src/core/memp.c +++ b/lwip/src/core/memp.c @@ -327,7 +327,7 @@ memp_malloc_pool_fn(const struct memp_desc *desc, const char *file, const int li /** * Get an element from a specific pool. - * + 1 * * @param type the pool to get an element from * * @return a pointer to the allocated memory or a NULL pointer on error diff --git a/lwip/src/core/tcp.c b/lwip/src/core/tcp.c index bd7d64e..2996ee7 100644 --- a/lwip/src/core/tcp.c +++ b/lwip/src/core/tcp.c @@ -724,12 +724,14 @@ tcp_bind(struct tcp_pcb *pcb, const ip_addr_t *ipaddr, u16_t port) #endif /* SO_REUSE */ { /* @todo: check accept_any_ip_version */ +#if 0 if ((IP_IS_V6(ipaddr) == IP_IS_V6_VAL(cpcb->local_ip)) && (ip_addr_isany(&cpcb->local_ip) || ip_addr_isany(ipaddr) || ip_addr_cmp(&cpcb->local_ip, ipaddr))) { return ERR_USE; } +#endif /* 0 */ } } } diff --git a/lwip/src/include/lwip/opt.h b/lwip/src/include/lwip/opt.h index 49bd12a..b19922f 100644 --- a/lwip/src/include/lwip/opt.h +++ b/lwip/src/include/lwip/opt.h @@ -923,7 +923,9 @@ #define LWIP_DHCP 0 #endif /* !LWIP_IPV4 */ +#ifndef LWIP_DHCP_TIMEOUT #define LWIP_DHCP_TIMEOUT 100 +#endif /** * DHCP_DOES_ARP_CHECK==1: Do an ARP check on the offered address. diff --git a/lwip/src/include/lwip/sockets.h b/lwip/src/include/lwip/sockets.h index 2b6bb5a..2917041 100644 --- a/lwip/src/include/lwip/sockets.h +++ b/lwip/src/include/lwip/sockets.h @@ -415,10 +415,15 @@ typedef struct ipv6_mreq { * we restrict parameters to at most 128 bytes. */ #if !defined(FIONREAD) || !defined(FIONBIO) +#undef IOCPARM_MASK #define IOCPARM_MASK 0x7fU /* parameters must be < 128 bytes */ +#ifndef __rtems__ #define IOC_VOID 0x20000000UL /* no parameters */ #define IOC_OUT 0x40000000UL /* copy out parameters */ +#endif /* __rtems __ */ +#undef IOC_IN #define IOC_IN 0x80000000UL /* copy in parameters */ +#ifndef __rtems__ #define IOC_INOUT (IOC_IN|IOC_OUT) /* 0x20000000 distinguishes new & old ioctl's */ @@ -426,6 +431,8 @@ typedef struct ipv6_mreq { #define _IOR(x,y,t) ((long)(IOC_OUT|((sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y))) +#endif /* __rtems__ */ +#undef _IOW #define _IOW(x,y,t) ((long)(IOC_IN|((sizeof(t)&IOCPARM_MASK)<<16)|((x)<<8)|(y))) #endif /* !defined(FIONREAD) || !defined(FIONBIO) */ |