mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-10 17:43:21 +00:00
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.
This commit is contained in:
@@ -1,3 +1,12 @@
|
|||||||
|
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>
|
2008-08-18 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
* libcsupport/include/rtems/libcsupport.h, libcsupport/src/scandir.c,
|
* libcsupport/include/rtems/libcsupport.h, libcsupport/src/scandir.c,
|
||||||
|
|||||||
@@ -633,7 +633,6 @@ int rtems_ftp_open(
|
|||||||
}
|
}
|
||||||
else if (1 != inet_aton(hostname,&(fsp->farCtrlAddress.sin_addr))) {
|
else if (1 != inet_aton(hostname,&(fsp->farCtrlAddress.sin_addr))) {
|
||||||
struct hostent *hent;
|
struct hostent *hent;
|
||||||
struct hostent *gethostbyname(const char *name);
|
|
||||||
|
|
||||||
hent = gethostbyname(hostname);
|
hent = gethostbyname(hostname);
|
||||||
if (hent != NULL) {
|
if (hent != NULL) {
|
||||||
|
|||||||
@@ -42,6 +42,7 @@
|
|||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <sys/libkern.h> /* for strcpy */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Convert network-format internet address
|
* Convert network-format internet address
|
||||||
@@ -52,7 +53,6 @@ inet_ntoa(in)
|
|||||||
struct in_addr in;
|
struct in_addr in;
|
||||||
{
|
{
|
||||||
static char ret[18];
|
static char ret[18];
|
||||||
char *strcpy(char *dest, const char *src);
|
|
||||||
|
|
||||||
strcpy(ret, "[inet_ntoa error]");
|
strcpy(ret, "[inet_ntoa error]");
|
||||||
(void) inet_ntop(AF_INET, &in, ret, sizeof ret);
|
(void) inet_ntop(AF_INET, &in, ret, sizeof ret);
|
||||||
|
|||||||
@@ -54,6 +54,7 @@
|
|||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <rpc/rpc.h>
|
#include <rpc/rpc.h>
|
||||||
|
#include <sys/select.h>
|
||||||
#ifdef YP
|
#ifdef YP
|
||||||
#include <rpcsvc/yp_prot.h>
|
#include <rpcsvc/yp_prot.h>
|
||||||
#include <rpcsvc/ypclnt.h>
|
#include <rpcsvc/ypclnt.h>
|
||||||
|
|||||||
@@ -268,7 +268,6 @@ void bootpboot_p_iflist(void)
|
|||||||
void *bootp_strdup_realloc(char *dst,const char *src)
|
void *bootp_strdup_realloc(char *dst,const char *src)
|
||||||
{
|
{
|
||||||
size_t len;
|
size_t len;
|
||||||
void *realloc(void * __r, size_t __size);
|
|
||||||
|
|
||||||
if (dst == NULL) {
|
if (dst == NULL) {
|
||||||
/* first allocation, simply use strdup */
|
/* first allocation, simply use strdup */
|
||||||
|
|||||||
@@ -137,6 +137,12 @@ rtems_bsdnet_free (void *addr, int type)
|
|||||||
free (addr);
|
free (addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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
|
* Do the initializations required by the BSD code
|
||||||
*/
|
*/
|
||||||
@@ -192,8 +198,6 @@ bsd_init (void)
|
|||||||
* Set up domains
|
* Set up domains
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
extern struct domain routedomain;
|
|
||||||
extern struct domain inetdomain;
|
|
||||||
|
|
||||||
routedomain.dom_next = domains;
|
routedomain.dom_next = domains;
|
||||||
domains = &routedomain;
|
domains = &routedomain;
|
||||||
@@ -214,6 +218,13 @@ bsd_init (void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* 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
|
* Initialize and start network operations
|
||||||
*/
|
*/
|
||||||
@@ -221,9 +232,6 @@ static int
|
|||||||
rtems_bsdnet_initialize (void)
|
rtems_bsdnet_initialize (void)
|
||||||
{
|
{
|
||||||
rtems_status_code sc;
|
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
|
* Set the priority of all network tasks
|
||||||
|
|||||||
@@ -20,6 +20,12 @@
|
|||||||
#include <rtems.h>
|
#include <rtems.h>
|
||||||
#include <rtems/rtems_bsdnet.h>
|
#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
|
* Default allocator for mbuf data. Over-ride in user code to change
|
||||||
* the way mbuf's are allocated.
|
* the way mbuf's are allocated.
|
||||||
@@ -27,7 +33,6 @@
|
|||||||
|
|
||||||
void* rtems_bsdnet_malloc_mbuf(size_t size, int type)
|
void* rtems_bsdnet_malloc_mbuf(size_t size, int type)
|
||||||
{
|
{
|
||||||
extern void *malloc(size_t);
|
|
||||||
return malloc(size);
|
return malloc(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,12 +31,16 @@ showicmpstat (const char *name, unsigned long n)
|
|||||||
printf ("%35s%12lu\n", name, n);
|
printf ("%35s%12lu\n", name, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* External data we peek at during statistics reporting
|
||||||
|
*/
|
||||||
|
extern unsigned int icmplenPanicAvoided;
|
||||||
|
|
||||||
void
|
void
|
||||||
rtems_bsdnet_show_icmp_stats (void)
|
rtems_bsdnet_show_icmp_stats (void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char cbuf[20];
|
char cbuf[20];
|
||||||
extern unsigned int icmplenPanicAvoided;
|
|
||||||
|
|
||||||
printf ("************ ICMP Statistics ************\n");
|
printf ("************ ICMP Statistics ************\n");
|
||||||
showicmpstat ("Calls to icmp_error()", icmpstat.icps_error);
|
showicmpstat ("Calls to icmp_error()", icmpstat.icps_error);
|
||||||
|
|||||||
@@ -347,6 +347,9 @@ extern struct kmembuckets bucket[];
|
|||||||
|
|
||||||
void free (void *addr, int type);
|
void free (void *addr, int type);
|
||||||
void *malloc (size_t size, int type, int flags);
|
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 /* _KERNEL */
|
||||||
|
|
||||||
#endif /* !_SYS_MALLOC_H_ */
|
#endif /* !_SYS_MALLOC_H_ */
|
||||||
|
|||||||
Reference in New Issue
Block a user