From e2cdf0d39d5fe8fdd6c4c457238db36289fc777d Mon Sep 17 00:00:00 2001 From: Simon Goldschmidt Date: Wed, 24 Aug 2011 20:22:21 +0200 Subject: [PATCH] fixed bug #34057 socklen_t should be a typedef --- CHANGELOG | 3 +++ src/include/lwip/sockets.h | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index b1eefa3e..f98b075e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -21,6 +21,9 @@ HISTORY ++ Bugfixes: + 2011-08-24: Simon Goldschmidt + * sockets.h: fixed bug #34057 socklen_t should be a typedef + 2011-08-24: Simon Goldschmidt * pbuf.c: fixed bug #34112 Odd check in pbuf_alloced_custom (typo) diff --git a/src/include/lwip/sockets.h b/src/include/lwip/sockets.h index 3c8fed24..6bc25a36 100644 --- a/src/include/lwip/sockets.h +++ b/src/include/lwip/sockets.h @@ -62,8 +62,10 @@ struct sockaddr { char sa_data[14]; }; -#ifndef socklen_t -# define socklen_t u32_t +/* If your port already typedef's socklen_t, define SOCKLEN_T_DEFINED + to prevent this code from redefining it. */ +#if !defined(socklen_t) && !defined(SOCKLEN_T_DEFINED) +typedef u32_t socklen_t; #endif /* Socket protocol types (TCP/UDP/RAW) */