[PATCH] Re: Why can't I compile 2.1.125 without networking

G. Allen Morris III (gam3@dharma.sehda.com)
Sat, 31 Oct 1998 11:41:10 -0800


>>>Philip Blundell said:
> >Shouldn't the kernel compile with all combinations of options.
>
Yes. There are only 340 options. That gives only 340! combinations.
If you start testing now...

Here is a patch that will let Linux compile w/o TCP/IP.
-------------------------- cut here -------------------------
--- linux/net/netsyms.c.orig Sat Oct 31 10:49:10 1998
+++ linux/net/netsyms.c Sat Oct 31 11:05:35 1998
@@ -100,12 +100,13 @@
EXPORT_SYMBOL(sock_create);
EXPORT_SYMBOL(sock_alloc);
EXPORT_SYMBOL(sock_release);
-EXPORT_SYMBOL(sock_setsockopt);
-EXPORT_SYMBOL(sock_getsockopt);
EXPORT_SYMBOL(sock_sendmsg);
EXPORT_SYMBOL(sock_recvmsg);
+#ifdef CONFIG_INET
EXPORT_SYMBOL(sk_alloc);
EXPORT_SYMBOL(sk_free);
+EXPORT_SYMBOL(sock_setsockopt);
+EXPORT_SYMBOL(sock_getsockopt);
EXPORT_SYMBOL(sock_wake_async);
EXPORT_SYMBOL(sock_alloc_send_skb);
EXPORT_SYMBOL(sock_init_data);
@@ -127,6 +128,9 @@
EXPORT_SYMBOL(sock_no_recvmsg);
EXPORT_SYMBOL(sock_rfree);
EXPORT_SYMBOL(sock_wfree);
+EXPORT_SYMBOL(sock_kmalloc);
+EXPORT_SYMBOL(sock_kfree_s);
+#endif
EXPORT_SYMBOL(skb_recv_datagram);
EXPORT_SYMBOL(skb_free_datagram);
EXPORT_SYMBOL(skb_copy_datagram);
@@ -135,8 +139,6 @@
EXPORT_SYMBOL(datagram_poll);
EXPORT_SYMBOL(put_cmsg);
EXPORT_SYMBOL(net_families);
-EXPORT_SYMBOL(sock_kmalloc);
-EXPORT_SYMBOL(sock_kfree_s);
EXPORT_SYMBOL(skb_queue_lock);

#ifdef CONFIG_FILTER
@@ -165,11 +167,13 @@
EXPORT_SYMBOL(neigh_parms_release);
EXPORT_SYMBOL(neigh_rand_reach_time);

+#ifdef CONFIG_INET
/* dst_entry */
EXPORT_SYMBOL(dst_alloc);
EXPORT_SYMBOL(__dst_free);
EXPORT_SYMBOL(dst_total);
EXPORT_SYMBOL(dst_destroy);
+#endif

/* misc. support routines */
EXPORT_SYMBOL(net_ratelimit);
@@ -185,7 +189,10 @@
EXPORT_SYMBOL(max_files);
EXPORT_SYMBOL(do_mknod);
EXPORT_SYMBOL(memcpy_toiovec);
+
+#ifdef CONFIG_INET
EXPORT_SYMBOL(csum_partial);
+#endif

#ifdef CONFIG_IPX_MODULE
EXPORT_SYMBOL(make_8023_client);
@@ -194,8 +201,10 @@
EXPORT_SYMBOL(destroy_EII_client);
#endif

+#ifdef CONFIG_INET
EXPORT_SYMBOL(sklist_destroy_socket);
EXPORT_SYMBOL(sklist_insert_socket);
+#endif

EXPORT_SYMBOL(scm_detach_fds);

@@ -407,11 +416,13 @@
EXPORT_SYMBOL(ether_setup);
EXPORT_SYMBOL(dev_new_index);
EXPORT_SYMBOL(dev_get_by_index);
+#ifdef CONFIG_INET
EXPORT_SYMBOL(eth_type_trans);
+EXPORT_SYMBOL(eth_copy_and_sum);
#ifdef CONFIG_FDDI
EXPORT_SYMBOL(fddi_type_trans);
#endif /* CONFIG_FDDI */
-EXPORT_SYMBOL(eth_copy_and_sum);
+#endif
EXPORT_SYMBOL(alloc_skb);
EXPORT_SYMBOL(__kfree_skb);
EXPORT_SYMBOL(skb_clone);
@@ -436,14 +447,17 @@
EXPORT_SYMBOL(dev_base);
EXPORT_SYMBOL(dev_close);
EXPORT_SYMBOL(dev_mc_add);
-EXPORT_SYMBOL(arp_find);
EXPORT_SYMBOL(n_tty_ioctl);
EXPORT_SYMBOL(tty_register_ldisc);
EXPORT_SYMBOL(kill_fasync);
-EXPORT_SYMBOL(ip_rcv);
-EXPORT_SYMBOL(arp_rcv);
EXPORT_SYMBOL(dev_mc_delete);

+#ifdef CONFIG_INET
+EXPORT_SYMBOL(arp_find);
+EXPORT_SYMBOL(arp_rcv);
+EXPORT_SYMBOL(ip_rcv);
+#endif
+
EXPORT_SYMBOL(if_port_text);

#if defined(CONFIG_ATALK) || defined(CONFIG_ATALK_MODULE)
@@ -456,6 +470,7 @@
EXPORT_SYMBOL(dlci_ioctl_hook);
#endif

+#ifdef CONFIG_INET
/* Packet scheduler modules want these. */
EXPORT_SYMBOL(qdisc_destroy);
EXPORT_SYMBOL(qdisc_reset);
@@ -485,6 +500,7 @@
#ifdef CONFIG_NET_CLS
EXPORT_SYMBOL(register_tcf_proto_ops);
EXPORT_SYMBOL(unregister_tcf_proto_ops);
+#endif
#endif

EXPORT_SYMBOL(register_gifconf);

-
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/