summaryrefslogtreecommitdiffstats
path: root/cpukit/libnetworking
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-04-22 09:15:11 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-04-22 09:25:11 +0200
commite800b0738b05e683ab64e509e4b48170c71dbd2b (patch)
tree214f638a5667c5762200ac775b4fb995e01855f9 /cpukit/libnetworking
parentnetwork: Ensure matching syscall prototypes (diff)
downloadrtems-e800b0738b05e683ab64e509e4b48170c71dbd2b.tar.bz2
network: Fix warnings
Diffstat (limited to 'cpukit/libnetworking')
-rw-r--r--cpukit/libnetworking/libc/res_comp.c2
-rw-r--r--cpukit/libnetworking/net/if.c4
-rw-r--r--cpukit/libnetworking/netinet/ip_divert.c3
-rw-r--r--cpukit/libnetworking/rtems/rtems_bsdnet_internal.h8
-rw-r--r--cpukit/libnetworking/rtems/rtems_dhcp.c1
-rw-r--r--cpukit/libnetworking/rtems/rtems_glue.c18
-rw-r--r--cpukit/libnetworking/rtems/rtems_showicmpstat.c2
-rw-r--r--cpukit/libnetworking/rtems/rtems_showifstat.c2
-rw-r--r--cpukit/libnetworking/rtems/rtems_showipstat.c2
-rw-r--r--cpukit/libnetworking/rtems/rtems_showmbuf.c2
-rw-r--r--cpukit/libnetworking/rtems/rtems_showroute.c2
-rw-r--r--cpukit/libnetworking/rtems/rtems_showtcpstat.c2
-rw-r--r--cpukit/libnetworking/rtems/rtems_showudpstat.c2
-rw-r--r--cpukit/libnetworking/rtems/rtems_socketpair.c2
-rw-r--r--cpukit/libnetworking/rtems/sghostname.c1
15 files changed, 38 insertions, 15 deletions
diff --git a/cpukit/libnetworking/libc/res_comp.c b/cpukit/libnetworking/libc/res_comp.c
index 377d283ac5..a1381fb12b 100644
--- a/cpukit/libnetworking/libc/res_comp.c
+++ b/cpukit/libnetworking/libc/res_comp.c
@@ -78,6 +78,8 @@
#include <string.h>
#include <unistd.h>
+#include "res_config.h"
+
#define BIND_4_COMPAT
/*
diff --git a/cpukit/libnetworking/net/if.c b/cpukit/libnetworking/net/if.c
index 64f9aaebb8..d0da62af39 100644
--- a/cpukit/libnetworking/net/if.c
+++ b/cpukit/libnetworking/net/if.c
@@ -435,7 +435,7 @@ if_slowtimo(void *arg)
* Map interface name to
* interface structure pointer.
*/
-struct ifnet *
+static struct ifnet *
ifunit(char *name)
{
char *cp;
@@ -715,7 +715,7 @@ ifconf(u_long cmd, caddr_t data)
struct ifconf *ifc = (struct ifconf *)data;
struct ifnet *ifp = ifnet;
struct ifaddr *ifa;
- struct ifreq ifr, *ifrp;
+ struct ifreq ifr;
char *ifrpc;
int space = ifc->ifc_len, error = 0;
diff --git a/cpukit/libnetworking/netinet/ip_divert.c b/cpukit/libnetworking/netinet/ip_divert.c
index bfced1b157..c731e6492d 100644
--- a/cpukit/libnetworking/netinet/ip_divert.c
+++ b/cpukit/libnetworking/netinet/ip_divert.c
@@ -54,6 +54,8 @@
#include <netinet/in_var.h>
#include <netinet/ip_var.h>
+#ifdef IPDIVERT
+
/*
* Divert sockets
*/
@@ -380,3 +382,4 @@ release:
m_freem(m);
return (error);
}
+#endif /* IPDIVERT */
diff --git a/cpukit/libnetworking/rtems/rtems_bsdnet_internal.h b/cpukit/libnetworking/rtems/rtems_bsdnet_internal.h
index d2f23d645c..b08d674755 100644
--- a/cpukit/libnetworking/rtems/rtems_bsdnet_internal.h
+++ b/cpukit/libnetworking/rtems/rtems_bsdnet_internal.h
@@ -223,6 +223,14 @@ int ioctl (int, ioctl_command_t, ...);
struct socket *rtems_bsdnet_fdToSocket(int fd);
+void sysctl_register_all(void *);
+
+void rtems_set_udp_buffer_sizes(u_long, u_long);
+
+void rtems_set_tcp_buffer_sizes(u_long, u_long);
+
+void rtems_set_sb_efficiency(u_long);
+
#ifdef __cplusplus
}
#endif
diff --git a/cpukit/libnetworking/rtems/rtems_dhcp.c b/cpukit/libnetworking/rtems/rtems_dhcp.c
index cb6966d833..74ea870497 100644
--- a/cpukit/libnetworking/rtems/rtems_dhcp.c
+++ b/cpukit/libnetworking/rtems/rtems_dhcp.c
@@ -80,6 +80,7 @@
#include <string.h>
#include <stdlib.h>
+#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/param.h> /* for MAXHOSTNAMELEN */
diff --git a/cpukit/libnetworking/rtems/rtems_glue.c b/cpukit/libnetworking/rtems/rtems_glue.c
index 38c7fd50e8..f079a67a3a 100644
--- a/cpukit/libnetworking/rtems/rtems_glue.c
+++ b/cpukit/libnetworking/rtems/rtems_glue.c
@@ -25,6 +25,7 @@
#include <sys/callout.h>
#include <sys/proc.h>
#include <sys/ioctl.h>
+#include <sys/systm.h>
#include <net/if.h>
#include <net/route.h>
#include <netinet/in.h>
@@ -37,11 +38,6 @@
#include "loop.h"
/*
- * Sysctl init all.
- */
-void sysctl_register_all(void *arg);
-
-/*
* Memory allocation
*/
static uint32_t nmbuf = (64L * 1024L) / MSIZE;
@@ -265,13 +261,6 @@ bsd_init (void)
}
/*
- * RTEMS Specific Helper Routines
- */
-extern void rtems_set_udp_buffer_sizes( u_long, u_long );
-extern void rtems_set_tcp_buffer_sizes( u_long, u_long );
-extern void rtems_set_sb_efficiency( u_long );
-
-/*
* Initialize and start network operations
*/
static int
@@ -843,8 +832,11 @@ rtems_bsdnet_log (int priority, const char *fmt, ...)
/*
* IP header checksum routine for processors which don't have an inline version
*/
+
+u_int in_cksum_hdr(const struct ip *);
+
u_int
-in_cksum_hdr (const void *ip)
+in_cksum_hdr (const struct ip *ip)
{
uint32_t sum;
const uint16_t *sp;
diff --git a/cpukit/libnetworking/rtems/rtems_showicmpstat.c b/cpukit/libnetworking/rtems/rtems_showicmpstat.c
index 4ae2fe00f4..c5ba5528d9 100644
--- a/cpukit/libnetworking/rtems/rtems_showicmpstat.c
+++ b/cpukit/libnetworking/rtems/rtems_showicmpstat.c
@@ -15,6 +15,8 @@
#include <netinet/ip_icmp.h>
#include <netinet/icmp_var.h>
+#include <rtems/rtems_bsdnet.h>
+
/*
* Display ICMP statistics
* Don't lock the rest of the network tasks out while printing.
diff --git a/cpukit/libnetworking/rtems/rtems_showifstat.c b/cpukit/libnetworking/rtems/rtems_showifstat.c
index 8eea7c470b..50be6c8eff 100644
--- a/cpukit/libnetworking/rtems/rtems_showifstat.c
+++ b/cpukit/libnetworking/rtems/rtems_showifstat.c
@@ -17,6 +17,8 @@
#include <netinet/in.h>
#include <arpa/inet.h>
+#include <rtems/rtems_bsdnet.h>
+
/*
* Display an address
*/
diff --git a/cpukit/libnetworking/rtems/rtems_showipstat.c b/cpukit/libnetworking/rtems/rtems_showipstat.c
index e0f6124759..1040c71ef0 100644
--- a/cpukit/libnetworking/rtems/rtems_showipstat.c
+++ b/cpukit/libnetworking/rtems/rtems_showipstat.c
@@ -18,6 +18,8 @@
#include <netinet/ip.h>
#include <netinet/ip_var.h>
+#include <rtems/rtems_bsdnet.h>
+
/*
* Display IP statistics
* Don't lock the rest of the network tasks out while printing.
diff --git a/cpukit/libnetworking/rtems/rtems_showmbuf.c b/cpukit/libnetworking/rtems/rtems_showmbuf.c
index 724838d350..14aa79e733 100644
--- a/cpukit/libnetworking/rtems/rtems_showmbuf.c
+++ b/cpukit/libnetworking/rtems/rtems_showmbuf.c
@@ -10,6 +10,8 @@
#include <sys/proc.h>
#include <sys/mbuf.h>
+#include <rtems/rtems_bsdnet.h>
+
/*
* Display MBUF statistics
* Don't lock the rest of the network tasks out while printing.
diff --git a/cpukit/libnetworking/rtems/rtems_showroute.c b/cpukit/libnetworking/rtems/rtems_showroute.c
index 6080fa3b4a..44b4c3bd28 100644
--- a/cpukit/libnetworking/rtems/rtems_showroute.c
+++ b/cpukit/libnetworking/rtems/rtems_showroute.c
@@ -29,6 +29,8 @@
#undef random
#include <stdlib.h>
+#include <rtems/rtems_bsdnet.h>
+
/*
* Information per route
*/
diff --git a/cpukit/libnetworking/rtems/rtems_showtcpstat.c b/cpukit/libnetworking/rtems/rtems_showtcpstat.c
index c534acd8d2..403e3c9f3d 100644
--- a/cpukit/libnetworking/rtems/rtems_showtcpstat.c
+++ b/cpukit/libnetworking/rtems/rtems_showtcpstat.c
@@ -20,6 +20,8 @@
#include <netinet/tcp_seq.h>
#include <netinet/tcp_var.h>
+#include <rtems/rtems_bsdnet.h>
+
/*
* Display TCP statistics
* Don't lock the rest of the network tasks out while printing.
diff --git a/cpukit/libnetworking/rtems/rtems_showudpstat.c b/cpukit/libnetworking/rtems/rtems_showudpstat.c
index 0c86e4cde9..285a5a69fc 100644
--- a/cpukit/libnetworking/rtems/rtems_showudpstat.c
+++ b/cpukit/libnetworking/rtems/rtems_showudpstat.c
@@ -18,6 +18,8 @@
#include <netinet/udp.h>
#include <netinet/udp_var.h>
+#include <rtems/rtems_bsdnet.h>
+
/*
* Display UDP statistics
* Don't lock the rest of the network tasks out while printing.
diff --git a/cpukit/libnetworking/rtems/rtems_socketpair.c b/cpukit/libnetworking/rtems/rtems_socketpair.c
index 72b8687031..55734dd791 100644
--- a/cpukit/libnetworking/rtems/rtems_socketpair.c
+++ b/cpukit/libnetworking/rtems/rtems_socketpair.c
@@ -30,6 +30,8 @@
#include <sys/socket.h>
#include <errno.h>
+#include "rtems_syscall.h"
+
int socketpair (int domain, int type, int protocol, int *rsv)
{
if ( !rsv ) {
diff --git a/cpukit/libnetworking/rtems/sghostname.c b/cpukit/libnetworking/rtems/sghostname.c
index 8ac5c58954..af383d41b9 100644
--- a/cpukit/libnetworking/rtems/sghostname.c
+++ b/cpukit/libnetworking/rtems/sghostname.c
@@ -9,6 +9,7 @@
#include <string.h>
#include <errno.h>
+#include <unistd.h>
#include <rtems/rtems_bsdnet.h>
#include <sys/param.h>
#include <sys/malloc.h>