summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2008-08-18 21:42:41 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2008-08-18 21:42:41 +0000
commit02aaec7647607e96532b93083557412daca02285 (patch)
tree3c43da9ca1d68b69d0d5d596176d1314e8e895ac
parent2008-08-18 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-02aaec7647607e96532b93083557412daca02285.tar.bz2
2008-08-18 Joel Sherrill <joel.sherrill@oarcorp.com>
* libnetworking/lib/ftpfs.c, libnetworking/libc/inet_ntoa.c, libnetworking/libc/rcmd.c, libnetworking/nfs/bootp_subr.c, libnetworking/rtems/rtems_glue.c, libnetworking/rtems/rtems_malloc_mbuf.c, libnetworking/rtems/rtems_showicmpstat.c, libnetworking/sys/malloc.h: Fix some warnings.
Diffstat (limited to '')
-rw-r--r--cpukit/ChangeLog9
-rw-r--r--cpukit/libnetworking/lib/ftpfs.c1
-rw-r--r--cpukit/libnetworking/libc/inet_ntoa.c2
-rw-r--r--cpukit/libnetworking/libc/rcmd.c1
-rw-r--r--cpukit/libnetworking/nfs/bootp_subr.c1
-rw-r--r--cpukit/libnetworking/rtems/rtems_glue.c18
-rw-r--r--cpukit/libnetworking/rtems/rtems_malloc_mbuf.c7
-rw-r--r--cpukit/libnetworking/rtems/rtems_showicmpstat.c6
-rw-r--r--cpukit/libnetworking/sys/malloc.h3
9 files changed, 38 insertions, 10 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 1c486cf7b5..d2319d1771 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,5 +1,14 @@
2008-08-18 Joel Sherrill <joel.sherrill@oarcorp.com>
+ * libnetworking/lib/ftpfs.c, libnetworking/libc/inet_ntoa.c,
+ libnetworking/libc/rcmd.c, libnetworking/nfs/bootp_subr.c,
+ libnetworking/rtems/rtems_glue.c,
+ libnetworking/rtems/rtems_malloc_mbuf.c,
+ libnetworking/rtems/rtems_showicmpstat.c, libnetworking/sys/malloc.h:
+ Fix some warnings.
+
+2008-08-18 Joel Sherrill <joel.sherrill@oarcorp.com>
+
* libcsupport/include/rtems/libcsupport.h, libcsupport/src/scandir.c,
libmisc/cpuuse/cpuusagereset.c, libmisc/monitor/mon-monitor.c,
libmisc/serdbg/serdbg.c, libmisc/serdbg/serdbg.h,
diff --git a/cpukit/libnetworking/lib/ftpfs.c b/cpukit/libnetworking/lib/ftpfs.c
index 0d2f742313..311eed6ecb 100644
--- a/cpukit/libnetworking/lib/ftpfs.c
+++ b/cpukit/libnetworking/lib/ftpfs.c
@@ -633,7 +633,6 @@ int rtems_ftp_open(
}
else if (1 != inet_aton(hostname,&(fsp->farCtrlAddress.sin_addr))) {
struct hostent *hent;
- struct hostent *gethostbyname(const char *name);
hent = gethostbyname(hostname);
if (hent != NULL) {
diff --git a/cpukit/libnetworking/libc/inet_ntoa.c b/cpukit/libnetworking/libc/inet_ntoa.c
index 7bafcc2685..d6a99a5cc9 100644
--- a/cpukit/libnetworking/libc/inet_ntoa.c
+++ b/cpukit/libnetworking/libc/inet_ntoa.c
@@ -42,6 +42,7 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdio.h>
+#include <sys/libkern.h> /* for strcpy */
/*
* Convert network-format internet address
@@ -52,7 +53,6 @@ inet_ntoa(in)
struct in_addr in;
{
static char ret[18];
- char *strcpy(char *dest, const char *src);
strcpy(ret, "[inet_ntoa error]");
(void) inet_ntop(AF_INET, &in, ret, sizeof ret);
diff --git a/cpukit/libnetworking/libc/rcmd.c b/cpukit/libnetworking/libc/rcmd.c
index e63ec76b6b..d0fb281e1f 100644
--- a/cpukit/libnetworking/libc/rcmd.c
+++ b/cpukit/libnetworking/libc/rcmd.c
@@ -54,6 +54,7 @@
#include <ctype.h>
#include <string.h>
#include <rpc/rpc.h>
+#include <sys/select.h>
#ifdef YP
#include <rpcsvc/yp_prot.h>
#include <rpcsvc/ypclnt.h>
diff --git a/cpukit/libnetworking/nfs/bootp_subr.c b/cpukit/libnetworking/nfs/bootp_subr.c
index a6bbe67a68..66ff4ef564 100644
--- a/cpukit/libnetworking/nfs/bootp_subr.c
+++ b/cpukit/libnetworking/nfs/bootp_subr.c
@@ -268,7 +268,6 @@ void bootpboot_p_iflist(void)
void *bootp_strdup_realloc(char *dst,const char *src)
{
size_t len;
- void *realloc(void * __r, size_t __size);
if (dst == NULL) {
/* first allocation, simply use strdup */
diff --git a/cpukit/libnetworking/rtems/rtems_glue.c b/cpukit/libnetworking/rtems/rtems_glue.c
index 52db0e0f49..1508412940 100644
--- a/cpukit/libnetworking/rtems/rtems_glue.c
+++ b/cpukit/libnetworking/rtems/rtems_glue.c
@@ -138,6 +138,12 @@ rtems_bsdnet_free (void *addr, int type)
}
/*
+ * Externs for BSD data we have to access during initialization
+ */
+extern struct domain routedomain;
+extern struct domain inetdomain;
+
+/*
* Do the initializations required by the BSD code
*/
static int
@@ -192,8 +198,6 @@ bsd_init (void)
* Set up domains
*/
{
- extern struct domain routedomain;
- extern struct domain inetdomain;
routedomain.dom_next = domains;
domains = &routedomain;
@@ -215,15 +219,19 @@ 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
rtems_bsdnet_initialize (void)
{
rtems_status_code sc;
- 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 );
/*
* Set the priority of all network tasks
diff --git a/cpukit/libnetworking/rtems/rtems_malloc_mbuf.c b/cpukit/libnetworking/rtems/rtems_malloc_mbuf.c
index ca7f527614..628d7dc23f 100644
--- a/cpukit/libnetworking/rtems/rtems_malloc_mbuf.c
+++ b/cpukit/libnetworking/rtems/rtems_malloc_mbuf.c
@@ -21,13 +21,18 @@
#include <rtems/rtems_bsdnet.h>
/*
+ * We want to use the REAL system malloc. Do not let the BSD malloc macro
+ * invade this file.
+ */
+extern void *malloc(size_t);
+
+/*
* Default allocator for mbuf data. Over-ride in user code to change
* the way mbuf's are allocated.
*/
void* rtems_bsdnet_malloc_mbuf(size_t size, int type)
{
- extern void *malloc(size_t);
return malloc(size);
}
diff --git a/cpukit/libnetworking/rtems/rtems_showicmpstat.c b/cpukit/libnetworking/rtems/rtems_showicmpstat.c
index c2dfefdd28..15c19c012c 100644
--- a/cpukit/libnetworking/rtems/rtems_showicmpstat.c
+++ b/cpukit/libnetworking/rtems/rtems_showicmpstat.c
@@ -31,12 +31,16 @@ showicmpstat (const char *name, unsigned long n)
printf ("%35s%12lu\n", name, n);
}
+/*
+ * External data we peek at during statistics reporting
+ */
+extern unsigned int icmplenPanicAvoided;
+
void
rtems_bsdnet_show_icmp_stats (void)
{
int i;
char cbuf[20];
- extern unsigned int icmplenPanicAvoided;
printf ("************ ICMP Statistics ************\n");
showicmpstat ("Calls to icmp_error()", icmpstat.icps_error);
diff --git a/cpukit/libnetworking/sys/malloc.h b/cpukit/libnetworking/sys/malloc.h
index 97088147b8..10b0a7964c 100644
--- a/cpukit/libnetworking/sys/malloc.h
+++ b/cpukit/libnetworking/sys/malloc.h
@@ -347,6 +347,9 @@ extern struct kmembuckets bucket[];
void free (void *addr, int type);
void *malloc (size_t size, int type, int flags);
+/* standard realloc but we cannot include stdlib.h */
+void *realloc(void * __r, size_t __size);
+
#endif /* _KERNEL */
#endif /* !_SYS_MALLOC_H_ */