2.2.17pre9 undefined reference

From: Petri Kaukasoina (kaukasoi@elektroni.ee.tut.fi)
Date: Sun Jul 02 2000 - 09:20:33 EST


Linking vmlinux gave me these

net/network.a(core.o): In function `sock_wmalloc':
core.o(.text+0x542): undefined reference to `net_statistics'
net/network.a(core.o): In function `sock_wmalloc_err':
core.o(.text+0x5ae): undefined reference to `net_statistics'
net/network.a(core.o): In function `sock_rmalloc':
core.o(.text+0x602): undefined reference to `net_statistics'
net/network.a(core.o): In function `sock_kmalloc':
core.o(.text+0x641): undefined reference to `net_statistics'
make: *** [vmlinux] Error 1

the relevant lines in .config

CONFIG_NET=y
CONFIG_UNIX=y
# CONFIG_INET is not set

It links and runs after this

--- linux-2.2.17pre9/net/core/sock.c.orig Sun Jul 2 15:03:11 2000
+++ linux-2.2.17pre9/net/core/sock.c Sun Jul 2 16:51:00 2000
@@ -566,7 +566,9 @@
                         skb->sk = sk;
                         return skb;
                 }
+#ifdef CONFIG_INET
                 net_statistics.SockMallocOOM++;
+#endif
         }
         return NULL;
 }
@@ -590,7 +592,9 @@
                         skb->sk = sk;
                         return skb;
                 }
+#ifdef CONFIG_INET
                 net_statistics.SockMallocOOM++;
+#endif
         }
         return NULL;
 }
@@ -608,7 +612,9 @@
                         skb->sk = sk;
                         return skb;
                 }
+#ifdef CONFIG_INET
                 net_statistics.SockMallocOOM++;
+#endif
         }
         return NULL;
 }
@@ -628,7 +634,9 @@
                 if (mem)
                         return mem;
                 atomic_sub(size, &sk->omem_alloc);
+#ifdef CONFIG_INET
                 net_statistics.SockMallocOOM++;
+#endif
         }
         return NULL;
 }

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



This archive was generated by hypermail 2b29 : Fri Jul 07 2000 - 21:00:10 EST