++ 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
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);