aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/net.c1
-rw-r--r--toynet.h13
-rw-r--r--toys.h11
-rw-r--r--toys/other/netcat.c1
-rw-r--r--toys/other/vconfig.c1
-rw-r--r--toys/pending/dhcp.c1
-rw-r--r--toys/pending/dhcpd.c1
-rw-r--r--toys/pending/ifconfig.c1
-rw-r--r--toys/pending/nbd_client.c1
-rw-r--r--toys/pending/netstat.c1
-rw-r--r--toys/pending/route.c1
-rw-r--r--toys/pending/syslogd.c1
-rw-r--r--toys/pending/traceroute.c1
13 files changed, 11 insertions, 24 deletions
diff --git a/lib/net.c b/lib/net.c
index f4b26439..c12eff43 100644
--- a/lib/net.c
+++ b/lib/net.c
@@ -1,5 +1,4 @@
#include "toys.h"
-#include "toynet.h"
int xsocket(int domain, int type, int protocol)
{
diff --git a/toynet.h b/toynet.h
deleted file mode 100644
index 3cfb0159..00000000
--- a/toynet.h
+++ /dev/null
@@ -1,13 +0,0 @@
-// Included after toys.h, for network stuff. Some build environments
-// don't include network support, so we shouldn't include it unless we're
-// going to build it.
-
-#include <arpa/inet.h>
-#include <netdb.h>
-#include <net/if.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#include <poll.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-
diff --git a/toys.h b/toys.h
index caf96123..8450b803 100644
--- a/toys.h
+++ b/toys.h
@@ -55,6 +55,17 @@
#include <wchar.h>
#include <wctype.h>
+// Networking stuff
+
+#include <arpa/inet.h>
+#include <netdb.h>
+#include <net/if.h>
+#include <netinet/in.h>
+#include <netinet/tcp.h>
+#include <poll.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+
#include "lib/lib.h"
#include "toys/e2fs.h"
diff --git a/toys/other/netcat.c b/toys/other/netcat.c
index e41fc4b2..c5d1ee7d 100644
--- a/toys/other/netcat.c
+++ b/toys/other/netcat.c
@@ -42,7 +42,6 @@ config NETCAT_LISTEN
#define FOR_netcat
#include "toys.h"
-#include "toynet.h"
GLOBALS(
char *filename; // -f read from filename instead of network
diff --git a/toys/other/vconfig.c b/toys/other/vconfig.c
index f84728d9..4013a792 100644
--- a/toys/other/vconfig.c
+++ b/toys/other/vconfig.c
@@ -24,7 +24,6 @@ config VCONFIG
*/
#include "toys.h"
-#include "toynet.h"
#include <linux/if_vlan.h>
#include <linux/sockios.h>
diff --git a/toys/pending/dhcp.c b/toys/pending/dhcp.c
index 0bb4ccdd..f93c9406 100644
--- a/toys/pending/dhcp.c
+++ b/toys/pending/dhcp.c
@@ -47,7 +47,6 @@ config DHCP
#define FOR_dhcp
#include "toys.h"
-#include "toynet.h"
// TODO: headers not in posix:
#include <netinet/ip.h>
diff --git a/toys/pending/dhcpd.c b/toys/pending/dhcpd.c
index 2a54f88c..2d4ee79b 100644
--- a/toys/pending/dhcpd.c
+++ b/toys/pending/dhcpd.c
@@ -25,7 +25,6 @@ config DEBUG_DHCP
#define FOR_dhcpd
#include "toys.h"
-#include "toynet.h"
#include <linux/sockios.h>
#include <linux/if_ether.h>
diff --git a/toys/pending/ifconfig.c b/toys/pending/ifconfig.c
index 111e4bbd..5801a67d 100644
--- a/toys/pending/ifconfig.c
+++ b/toys/pending/ifconfig.c
@@ -30,7 +30,6 @@ config IFCONFIG
#define FOR_ifconfig
#include "toys.h"
-#include "toynet.h"
#include <net/if_arp.h>
#include <net/ethernet.h>
diff --git a/toys/pending/nbd_client.c b/toys/pending/nbd_client.c
index 86972303..9164a114 100644
--- a/toys/pending/nbd_client.c
+++ b/toys/pending/nbd_client.c
@@ -32,7 +32,6 @@ config NBD_CLIENT
#define FOR_nbd_client
#include "toys.h"
-#include "toynet.h"
#define NBD_SET_SOCK _IO(0xab, 0)
#define NBD_SET_BLKSIZE _IO(0xab, 1)
diff --git a/toys/pending/netstat.c b/toys/pending/netstat.c
index 88e5bd3b..34644f44 100644
--- a/toys/pending/netstat.c
+++ b/toys/pending/netstat.c
@@ -29,7 +29,6 @@ config NETSTAT
#define FOR_netstat
#include "toys.h"
-#include "toynet.h"
#include <net/route.h>
typedef union _iaddr {
diff --git a/toys/pending/route.c b/toys/pending/route.c
index 63370882..cf91cdbe 100644
--- a/toys/pending/route.c
+++ b/toys/pending/route.c
@@ -21,7 +21,6 @@ config ROUTE
#define FOR_route
#include "toys.h"
-#include "toynet.h"
#include <net/route.h>
#include <sys/param.h>
diff --git a/toys/pending/syslogd.c b/toys/pending/syslogd.c
index c2cc34a1..e272691d 100644
--- a/toys/pending/syslogd.c
+++ b/toys/pending/syslogd.c
@@ -35,7 +35,6 @@ config SYSLOGD
#define FOR_syslogd
#define SYSLOG_NAMES
#include "toys.h"
-#include "toynet.h"
// UNIX Sockets for listening
struct unsocks {
diff --git a/toys/pending/traceroute.c b/toys/pending/traceroute.c
index e52a7880..832bda5e 100644
--- a/toys/pending/traceroute.c
+++ b/toys/pending/traceroute.c
@@ -36,7 +36,6 @@ config TRACEROUTE
*/
#define FOR_traceroute
#include "toys.h"
-#include "toynet.h"
#include <netinet/udp.h>
#include <netinet/ip_icmp.h>