[PATCH] compiling AF_UNIX without AF_INET

imel... (imel96@puspa.cs.ui.ac.id)
Fri, 3 Sep 1999 17:17:32 +0000 (GMT)


this allow me to compile unix domain socket without
tcp/ip networking.
also small cosmetic changes in configure.help. i never
thought procfs would be that big.

diff -ru linux-2.3.16/Documentation/Configure.help linux/Documentation/Configure.help
--- linux-2.3.16/Documentation/Configure.help Sat Sep 4 00:15:14 1999
+++ linux/Documentation/Configure.help Sat Sep 4 00:10:35 1999
@@ -7216,7 +7216,7 @@
You don't want to use the minix filesystem on your hard disk because
of certain built-in restrictions, but it is sometimes found on older
Linux floppy disks. This option will enlarge your kernel by about
- 25 kB. If unsure, say N.
+ 28 kB. If unsure, say N.

If you want to compile this as a module ( = code which can be
inserted in and removed from the running kernel whenever you want),
@@ -7242,7 +7242,7 @@
ext2fs is a diskless Linux box which mounts all files over the
network using NFS (in this case it's sufficient to say Y to "NFS
filesystem support" below). Saying Y here will enlarge your kernel
- by about 41 kB.
+ by about 44 kB.

The Ext2fs-Undeletion mini-HOWTO, available via FTP (user:
anonymous) from ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/mini,
@@ -7430,7 +7430,7 @@
that has a program like lynx or netscape), and also on the proc(8)
manpage ("man 8 proc").

- This option will enlarge your kernel by about 18 KB. Several
+ This option will enlarge your kernel by about 67 KB. Several
programs depend on this, so everyone should say Y here.

NFS filesystem support
diff -ru linux-2.3.16/include/net/checksum.h linux/include/net/checksum.h
--- linux-2.3.16/include/net/checksum.h Thu Aug 19 19:26:10 1999
+++ linux/include/net/checksum.h Sat Sep 4 00:25:03 1999
@@ -28,9 +28,12 @@

#include <asm/types.h>
#include <asm/byteorder.h>
-#include <net/ip.h>
#include <asm/uaccess.h>
#include <asm/checksum.h>
+
+#ifdef CONFIG_INET
+#include <net/ip.h>
+#endif

#ifndef _HAVE_ARCH_IPV6_CSUM

diff -ru linux-2.3.16/net/core/datagram.c linux/net/core/datagram.c
--- linux-2.3.16/net/core/datagram.c Sat Sep 4 00:15:17 1999
+++ linux/net/core/datagram.c Sat Sep 4 00:20:40 1999
@@ -36,11 +36,14 @@
#include <linux/netdevice.h>
#include <linux/poll.h>

+#ifdef CONFIG_INET
#include <net/ip.h>
-#include <net/protocol.h>
-#include <net/route.h>
#include <net/tcp.h>
#include <net/udp.h>
+#endif
+
+#include <net/protocol.h>
+#include <net/route.h>
#include <linux/skbuff.h>
#include <net/sock.h>

diff -ru linux-2.3.16/net/core/dev_mcast.c linux/net/core/dev_mcast.c
--- linux-2.3.16/net/core/dev_mcast.c Sat Sep 4 00:15:09 1999
+++ linux/net/core/dev_mcast.c Fri Sep 3 23:47:10 1999
@@ -40,12 +40,14 @@
#include <linux/etherdevice.h>
#include <linux/proc_fs.h>
#include <linux/init.h>
-#include <net/ip.h>
#include <net/route.h>
#include <linux/skbuff.h>
#include <net/sock.h>
#include <net/arp.h>

+#ifdef CONFIG_INET
+#include <net/ip.h>
+#endif

/*
* Device multicast list maintenance.
diff -ru linux-2.3.16/net/core/iovec.c linux/net/core/iovec.c
--- linux-2.3.16/net/core/iovec.c Sun May 16 10:43:09 1999
+++ linux/net/core/iovec.c Sat Sep 4 00:04:19 1999
@@ -27,6 +27,7 @@
#include <asm/uaccess.h>
#include <asm/byteorder.h>
#include <net/checksum.h>
+#include <net/sock.h>

/*
* Verify iovec. The caller must ensure that the iovec is big enough
diff -ru linux-2.3.16/net/core/rtnetlink.c linux/net/core/rtnetlink.c
--- linux-2.3.16/net/core/rtnetlink.c Sat Sep 4 00:15:09 1999
+++ linux/net/core/rtnetlink.c Sat Sep 4 00:27:54 1999
@@ -41,14 +41,17 @@

#include <linux/inet.h>
#include <linux/netdevice.h>
-#include <net/ip.h>
#include <net/protocol.h>
#include <net/arp.h>
#include <net/route.h>
-#include <net/tcp.h>
-#include <net/udp.h>
#include <net/sock.h>
#include <net/pkt_sched.h>
+
+#ifdef CONFIG_INET
+#include <net/ip.h>
+#include <net/tcp.h>
+#include <net/udp.h>
+#endif

DECLARE_MUTEX(rtnl_sem);

diff -ru linux-2.3.16/net/core/scm.c linux/net/core/scm.c
--- linux-2.3.16/net/core/scm.c Sat Sep 4 00:15:09 1999
+++ linux/net/core/scm.c Sat Sep 4 00:28:18 1999
@@ -27,10 +27,14 @@
#include <asm/uaccess.h>

#include <linux/inet.h>
+
+#ifdef CONFIG_INET
#include <net/ip.h>
-#include <net/protocol.h>
#include <net/tcp.h>
#include <net/udp.h>
+#endif
+
+#include <net/protocol.h>
#include <linux/skbuff.h>
#include <net/sock.h>
#include <net/scm.h>
diff -ru linux-2.3.16/net/core/skbuff.c linux/net/core/skbuff.c
--- linux-2.3.16/net/core/skbuff.c Sat Sep 4 00:15:09 1999
+++ linux/net/core/skbuff.c Sat Sep 4 00:28:33 1999
@@ -51,11 +51,14 @@
#include <linux/slab.h>
#include <linux/init.h>

+#ifdef CONFIG_INET
#include <net/ip.h>
-#include <net/protocol.h>
-#include <net/dst.h>
#include <net/tcp.h>
#include <net/udp.h>
+#endif
+
+#include <net/protocol.h>
+#include <net/dst.h>
#include <net/sock.h>

#include <asm/uaccess.h>
diff -ru linux-2.3.16/net/core/sock.c linux/net/core/sock.c
--- linux-2.3.16/net/core/sock.c Sat Sep 4 00:15:17 1999
+++ linux/net/core/sock.c Sat Sep 4 00:28:53 1999
@@ -113,17 +113,20 @@

#include <linux/inet.h>
#include <linux/netdevice.h>
-#include <net/ip.h>
#include <net/protocol.h>
#include <net/arp.h>
#include <net/route.h>
-#include <net/tcp.h>
-#include <net/udp.h>
#include <linux/skbuff.h>
#include <net/sock.h>
#include <net/raw.h>
#include <net/icmp.h>
#include <linux/ipsec.h>
+
+#ifdef CONFIG_INET
+#include <net/ip.h>
+#include <net/tcp.h>
+#include <net/udp.h>
+#endif

#ifdef CONFIG_FILTER
#include <linux/filter.h>
diff -ru linux-2.3.16/net/ethernet/eth.c linux/net/ethernet/eth.c
--- linux-2.3.16/net/ethernet/eth.c Thu Aug 19 18:34:28 1999
+++ linux/net/ethernet/eth.c Fri Sep 3 23:48:58 1999
@@ -55,10 +55,13 @@
#include <net/arp.h>
#include <net/sock.h>
#include <net/ipv6.h>
-#include <net/ip.h>
#include <asm/uaccess.h>
#include <asm/system.h>
#include <asm/checksum.h>
+
+#ifdef CONFIG_INET
+#include <net/ip.h>
+#endif

static int __init eth_setup(char *str)
{
diff -ru linux-2.3.16/net/socket.c linux/net/socket.c
--- linux-2.3.16/net/socket.c Sat Sep 4 00:15:09 1999
+++ linux/net/socket.c Fri Sep 3 23:51:55 1999
@@ -75,12 +75,15 @@
#include <asm/uaccess.h>

#include <linux/inet.h>
-#include <net/ip.h>
#include <net/sock.h>
-#include <net/tcp.h>
#include <net/udp.h>
#include <net/scm.h>
#include <linux/netfilter.h>
+
+#ifdef CONFIG_INET
+#include <net/ip.h>
+#include <net/tcp.h>
+#endif

static int sock_no_open(struct inode *irrelevant, struct file *dontcare);
static long long sock_lseek(struct file *file, long long offset, int whence);
diff -ru linux-2.3.16/net/unix/af_unix.c linux/net/unix/af_unix.c
--- linux-2.3.16/net/unix/af_unix.c Sat Sep 4 00:15:18 1999
+++ linux/net/unix/af_unix.c Sat Sep 4 00:06:22 1999
@@ -99,13 +99,17 @@
#include <linux/skbuff.h>
#include <linux/netdevice.h>
#include <net/sock.h>
-#include <net/tcp.h>
#include <net/af_unix.h>
#include <linux/proc_fs.h>
#include <net/scm.h>
#include <linux/init.h>
#include <linux/poll.h>
#include <linux/smp_lock.h>
+#include <linux/rtnetlink.h>
+
+#ifdef CONFIG_INET
+#include <net/tcp.h>
+#endif

#include <asm/checksum.h>

diff -ru linux-2.3.16/net/unix/garbage.c linux/net/unix/garbage.c
--- linux-2.3.16/net/unix/garbage.c Sat Sep 4 00:15:09 1999
+++ linux/net/unix/garbage.c Fri Sep 3 23:50:56 1999
@@ -78,9 +78,12 @@
#include <linux/proc_fs.h>

#include <net/sock.h>
-#include <net/tcp.h>
#include <net/af_unix.h>
#include <net/scm.h>
+
+#ifdef CONFIG_INET
+#include <net/tcp.h>
+#endif

/* Internal data structures and random procedures: */

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