fix bug #21654: exclude definition of struct timeval from #ifndef FD_SET. If including <sys/time.h> for system-struct timeval, LWIP_TIMEVAL_PRIVATE now has to be set to 0 in lwipopts.h

This commit is contained in:
goldsimon 2007-12-02 15:24:02 +00:00
parent df1b7ea311
commit 47d8d69b81
2 changed files with 13 additions and 10 deletions

View File

@ -508,6 +508,11 @@ HISTORY
++ Bug fixes:
2007-12-02 Simon Goldschmidt
* sockets.h: fix bug #21654: exclude definition of struct timeval from #ifndef FD_SET
If including <sys/time.h> for system-struct timeval, LWIP_TIMEVAL_PRIVATE now
has to be set to 0 in lwipopts.h
2007-12-02 Simon Goldschmidt
* api_msg.c, api_lib.c: fix bug #21656 (recvmbox problem in netconn API): always
allocate a recvmbox in netconn_new_with_proto_and_callback. For a tcp-listen

View File

@ -261,23 +261,21 @@ typedef struct ip_mreq {
unsigned char fd_bits [(FD_SETSIZE+7)/8];
} fd_set;
/*
* only define this in sockets.c so it does not interfere
* with other projects namespaces where timeval is present
*/
#endif /* FD_SET */
/** LWIP_TIMEVAL_PRIVATE: if you want to use the struct timeval provided
* by your system, set this to 0 and include <sys/time.h> in cc.h */
#ifndef LWIP_TIMEVAL_PRIVATE
#define LWIP_TIMEVAL_PRIVATE 1
#endif
#if LWIP_TIMEVAL_PRIVATE
struct timeval {
long tv_sec; /* seconds */
long tv_usec; /* and microseconds */
};
struct timeval {
long tv_sec; /* seconds */
long tv_usec; /* and microseconds */
};
#endif /* LWIP_TIMEVAL_PRIVATE */
#endif /* FD_SET */
void lwip_socket_init(void);
int lwip_accept(int s, struct sockaddr *addr, socklen_t *addrlen);