I mailed this over to Alan, and he directed me to this address for
net/core maint issues. BTW, the README in the net directory still lists
him as the maintainer. I haven't seen this issue mentioned anywhere
else, which I find a bit odd and makes me suspect myself rather than an
error in the kernel. But I've tried the compile with a few different
toolchains and consistently hit the same issue.
Rev
---------- Forwarded message ----------
Date: Sat, 22 Dec 2001 13:28:08 -0800 (PST)
From: Reverend <reverend@xxxxxxxxxxxx>
To: alan@xxxxxxxxxxxxxxxxxxx
Subject: [BUG] Compile errors with networking disabled
Hey Alan,
You're listed as the maintainer for net/core in the 2.5 series
still. If that isn't really the case please let me know - I'll try to
figure out who is. I get a compile error if I turn off networking
completely in the 2.5 series (I tried a few of the prepatch versions, and
attached a patch against 2.5.1-pre11). I doubt that this patch is the
correct way to address the issue, but it's been working for me. I get
the following error when compiling:
In file included from /usr/src/linux/include/net/tcp.h:1036,
from sock.c:122:
/usr/src/linux/include/net/tcp_ecn.h: In function `TCP_ECN_send':
/usr/src/linux/include/net/tcp_ecn.h:54: union has no member named `af_inet'
/usr/src/linux/include/net/tcp_ecn.h:61: union has no member named `af_inet'
In file included from /usr/src/linux/include/net/tcp.h:1036,
from skbuff.c:58:
/usr/src/linux/include/net/tcp_ecn.h: In function `TCP_ECN_send':
/usr/src/linux/include/net/tcp_ecn.h:54: union has no member named `af_inet'
/usr/src/linux/include/net/tcp_ecn.h:61: union has no member named `af_inet'
make[3]: *** [sock.o] Error 1
The errors are actually on INET_ECN_xmit and INET_ECN_dontxmit, which are
macro functions in include/net/inet_ecn.h and reference the af_inet field
of protinfo. af_inet isn't included in protinfo unless networking is
configured on however. I just nulled the functions, but the correct
answer might be to cut out the references to the macros all together
unless networking is on. I leave it to hands more capable than my own to
determine the correct sollution.
Rev
diff -urN linux/include/net/inet_ecn.h linux-edited/include/net/inet_ecn.h
--- linux/include/net/inet_ecn.h Tue Oct 30 15:08:12 2001
+++ linux-edited/include/net/inet_ecn.h Sat Dec 22 13:17:31 2001
@@ -24,8 +24,17 @@
return outer;
}
+#if defined(CONFIG_INET) || defined (CONFIG_INET_MODULE)
+
#define INET_ECN_xmit(sk) do { (sk)->protinfo.af_inet.tos |= 2; } while
(0)
#define INET_ECN_dontxmit(sk) do { (sk)->protinfo.af_inet.tos &= ~3; }
while (0)
+
+#else
+
+#define INET_ECN_xmit(sk) do { ; } while (0)
+#define INET_ECN_dontxmit(sk) do { ; } while (0)
+
+#endif /* defined(CONFIG_INET) || defined (CONFIG_INET_MODULE) */
#define IP6_ECN_flow_init(label) do { \
(label) &= ~htonl(3<<20); \
|