Index: src/api/api_lib.c
===================================================================
RCS file: /sources/lwip/lwip/src/api/api_lib.c,v
retrieving revision 1.73
diff -u -r1.73 api_lib.c
--- src/api/api_lib.c	2 Nov 2007 10:37:09 -0000	1.73
+++ src/api/api_lib.c	6 Nov 2007 19:39:34 -0000
@@ -44,10 +44,14 @@
 #if LWIP_NETCONN /* don't build if not configured for use in lwipopts.h */
 
 #include "lwip/api.h"
-#include "lwip/api_msg.h"
 #include "lwip/tcpip.h"
 #include "lwip/memp.h"
 
+#include "lwip/ip.h"
+#include "lwip/raw.h"
+#include "lwip/udp.h"
+#include "lwip/tcp.h"
+
 #include <string.h>
 
 /**
Index: src/api/api_msg.c
===================================================================
RCS file: /sources/lwip/lwip/src/api/api_msg.c,v
retrieving revision 1.75
diff -u -r1.75 api_msg.c
--- src/api/api_msg.c	2 Nov 2007 10:37:09 -0000	1.75
+++ src/api/api_msg.c	6 Nov 2007 19:44:20 -0000
@@ -41,8 +41,13 @@
 #if LWIP_NETCONN /* don't build if not configured for use in lwipopts.h */
 
 #include "lwip/api_msg.h"
+
+#include "lwip/ip.h"
+#include "lwip/udp.h"
+#include "lwip/tcp.h"
+#include "lwip/raw.h"
+
 #include "lwip/memp.h"
-#include "lwip/sys.h"
 #include "lwip/tcpip.h"
 #include "lwip/igmp.h"
 
Index: src/api/sockets.c
===================================================================
RCS file: /sources/lwip/lwip/src/api/sockets.c,v
retrieving revision 1.95
diff -u -r1.95 sockets.c
--- src/api/sockets.c	2 Nov 2007 10:37:09 -0000	1.95
+++ src/api/sockets.c	6 Nov 2007 19:21:39 -0000
@@ -48,6 +48,7 @@
 #include "lwip/igmp.h"
 #include "lwip/inet.h"
 #include "lwip/tcp.h"
+#include "lwip/udp.h"
 #include "lwip/tcpip.h"
 
 #include <string.h>
Index: src/include/lwip/api.h
===================================================================
RCS file: /sources/lwip/lwip/src/include/lwip/api.h,v
retrieving revision 1.34
diff -u -r1.34 api.h
--- src/include/lwip/api.h	2 Nov 2007 10:37:09 -0000	1.34
+++ src/include/lwip/api.h	6 Nov 2007 19:41:58 -0000
@@ -36,13 +36,9 @@
 
 #if LWIP_NETCONN /* don't build if not configured for use in lwipopts.h */
 
-#include "lwip/pbuf.h"
 #include "lwip/netbuf.h"
 #include "lwip/sys.h"
-#include "lwip/ip.h"
-#include "lwip/raw.h"
-#include "lwip/udp.h"
-#include "lwip/tcp.h"
+#include "lwip/ip_addr.h"
 #include "lwip/err.h"
 
 #ifdef __cplusplus
@@ -56,8 +52,8 @@
 /* Flags for netconn_write */
 #define NETCONN_NOFLAG 0x00
 #define NETCONN_NOCOPY 0x00 /* Only for source code compatibility */
-#define NETCONN_COPY   TCP_WRITE_FLAG_COPY
-#define NETCONN_MORE   TCP_WRITE_FLAG_MORE
+#define NETCONN_COPY   0x01
+#define NETCONN_MORE   0x02
 
 /* Helpers to process several netconn_types by the same code */
 #define NETCONNTYPE_GROUP(t)    (t&0xF0)
@@ -97,6 +93,11 @@
 };
 #endif /* LWIP_IGMP */
 
+struct ip_pcb;
+struct tcp_pcb;
+struct udp_pcb;
+struct raw_pcb;
+
 struct netconn {
   enum netconn_type type;
   enum netconn_state state;
Index: src/include/lwip/api_msg.h
===================================================================
RCS file: /sources/lwip/lwip/src/include/lwip/api_msg.h,v
retrieving revision 1.20
diff -u -r1.20 api_msg.h
--- src/include/lwip/api_msg.h	1 Nov 2007 17:37:51 -0000	1.20
+++ src/include/lwip/api_msg.h	6 Nov 2007 19:42:38 -0000
@@ -36,17 +36,14 @@
 
 #if LWIP_NETCONN /* don't build if not configured for use in lwipopts.h */
 
-#include "lwip/pbuf.h"
-#include "lwip/sys.h"
-#include "lwip/ip.h"
-#include "lwip/udp.h"
-#include "lwip/tcp.h"
-#include "lwip/api.h"
+#include "lwip/ip_addr.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+enum netconn_igmp;
+
 /* IP addresses and port numbers are expected to be in
  * the same byte order as in the corresponding pcb.
  */
Index: src/include/lwip/tcp.h
===================================================================
RCS file: /sources/lwip/lwip/src/include/lwip/tcp.h,v
retrieving revision 1.57
diff -u -r1.57 tcp.h
--- src/include/lwip/tcp.h	1 Nov 2007 19:38:01 -0000	1.57
+++ src/include/lwip/tcp.h	6 Nov 2007 19:30:42 -0000
@@ -42,6 +42,7 @@
 #include "lwip/ip.h"
 #include "lwip/icmp.h"
 #include "lwip/err.h"
+#include "lwip/api.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -91,8 +92,8 @@
 err_t            tcp_close   (struct tcp_pcb *pcb);
 
 /* Flags for "apiflags" parameter in tcp_write and tcp_enqueue */
-#define TCP_WRITE_FLAG_COPY 0x01
-#define TCP_WRITE_FLAG_MORE 0x02
+#define TCP_WRITE_FLAG_COPY  NETCONN_COPY
+#define TCP_WRITE_FLAG_MORE  NETCONN_MORE
 
 err_t            tcp_write   (struct tcp_pcb *pcb, const void *dataptr, u16_t len,
                               u8_t apiflags);
Index: src/include/lwip/tcpip.h
===================================================================
RCS file: /sources/lwip/lwip/src/include/lwip/tcpip.h,v
retrieving revision 1.19
diff -u -r1.19 tcpip.h
--- src/include/lwip/tcpip.h	12 Sep 2007 09:19:45 -0000	1.19
+++ src/include/lwip/tcpip.h	6 Nov 2007 19:30:20 -0000
@@ -39,6 +39,7 @@
 #include "lwip/api_msg.h"
 #include "lwip/netifapi.h"
 #include "lwip/pbuf.h"
+#include "lwip/api.h"
 
 #ifdef __cplusplus
 extern "C" {
