[uPATCH] 2.4.17-preX compile fix for RedHat gcc 3.1-0.10

From: Wayne Whitney (whitney@math.berkeley.edu)
Date: Tue Dec 11 2001 - 00:27:05 EST


I recently upgraded to "gcc version 3.1 20011127 (Red Hat Linux Rawhide
3.1-0.10)". It compiles the recent 2.4.17-preX kernels OK, with one small
hitch: rpciod_tcp_dispatcher in module net/sunrpc/sunrpc.o is an
unresolved symbol. The patch below (or an equivalent) is required for
net/sunrpc/sched.c to compile properly with this version of gcc.

The situation is that net/sunrpc/sched.c (the only caller of
rpciod_tcp_dispatcher) includes linux/sunrpc/clnt.h, which includes
linux/sunrpc/xprt.h. linux/sunrpc/clnt.h defines rpciod_tcp_dispatcher as
extern void, while linux/sunrpc/xprt.h defines it as static inline.
Apparently this latter definition is the intended one, and while earlier
versions of gcc chose it, the above version of gcc choses the first

Since I'm no C expert, I don't know what the correct behavior for gcc is.
So maybe this is a bug in the kernel, or maybe it is a bug in the above
version of gcc.


--- linux-2.4.17-pre6/include/linux/sunrpc/clnt.h Mon Dec 10 20:36:26 2001
+++ linux-2.4.17-pre7/include/linux/sunrpc/clnt.h Mon Dec 10 20:50:39 2001
@@ -136,7 +136,6 @@
         xprt_set_timeout(&clnt->cl_timeout, retr, incr);
-extern void rpciod_tcp_dispatcher(void);
 extern void rpciod_wake_up(void);

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

This archive was generated by hypermail 2b29 : Sat Dec 15 2001 - 21:00:19 EST