mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-16 23:15:37 +00:00
sockets: fix IS_SOCK_ADDR_ALIGNED() for 16 bit platforms
See bug 57344 Reported-by: Victor Brzeski <VBrzeski@gmail.com> Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
This commit is contained in:
parent
03998f5147
commit
bef201e162
@ -200,7 +200,7 @@ static void sockaddr_to_ipaddr_port(const struct sockaddr *sockaddr, ip_addr_t *
|
||||
IS_SOCK_ADDR_TYPE_VALID(name))
|
||||
#define SOCK_ADDR_TYPE_MATCH_OR_UNSPEC(name, sock) (((name)->sa_family == AF_UNSPEC) || \
|
||||
SOCK_ADDR_TYPE_MATCH(name, sock))
|
||||
#define IS_SOCK_ADDR_ALIGNED(name) ((((mem_ptr_t)(name)) % 4) == 0)
|
||||
#define IS_SOCK_ADDR_ALIGNED(name) ((((mem_ptr_t)(name)) % LWIP_MIN(4, MEM_ALIGNMENT)) == 0)
|
||||
|
||||
|
||||
#define LWIP_SOCKOPT_CHECK_OPTLEN(sock, optlen, opttype) do { if ((optlen) < sizeof(opttype)) { done_socket(sock); return EINVAL; }}while(0)
|
||||
|
Loading…
Reference in New Issue
Block a user