aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-08-30 09:51:20 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2008-08-30 09:51:20 +0000
commit06ed40f3f8f767f491ce6766122549a2161cb097 (patch)
tree6eaa15f04877e4d6cd4857602cd99dd7cf2e8e9e
parent7a63040c5f9740a5d351b68d475df6aa8b8a1d2a (diff)
downloadslirp-06ed40f3f8f767f491ce6766122549a2161cb097.zip
slirp-06ed40f3f8f767f491ce6766122549a2161cb097.tar.gz
slirp-06ed40f3f8f767f491ce6766122549a2161cb097.tar.bz2
Fix some warnings that would be generated by gcc -Wredundant-decls
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5115 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--debug.c2
-rw-r--r--mbuf.c6
-rw-r--r--misc.h2
-rw-r--r--slirp_config.h8
-rw-r--r--socket.c1
5 files changed, 8 insertions, 11 deletions
diff --git a/debug.c b/debug.c
index 4c988c4..676eb02 100644
--- a/debug.c
+++ b/debug.c
@@ -16,8 +16,6 @@ int dostats = 0;
#endif
int slirp_debug = 0;
-extern char *strerror _P((int));
-
/* Carry over one item from main.c so that the tty's restored.
* Only done when the tty being used is /dev/tty --RedWolf */
#ifndef CONFIG_QEMU
diff --git a/mbuf.c b/mbuf.c
index ce3a644..b6dc2e4 100644
--- a/mbuf.c
+++ b/mbuf.c
@@ -28,7 +28,7 @@ int mbuf_max = 0;
* Find a nice value for msize
* XXX if_maxlinkhdr already in mtu
*/
-#define MSIZE (IF_MTU + IF_MAXLINKHDR + sizeof(struct m_hdr) + 6)
+#define SLIRP_MSIZE (IF_MTU + IF_MAXLINKHDR + sizeof(struct m_hdr) + 6)
void m_init()
{
@@ -52,7 +52,7 @@ struct mbuf *m_get()
DEBUG_CALL("m_get");
if (m_freelist.m_next == &m_freelist) {
- m = (struct mbuf *)malloc(MSIZE);
+ m = (struct mbuf *)malloc(SLIRP_MSIZE);
if (m == NULL)
goto end_error;
mbuf_alloced++;
@@ -70,7 +70,7 @@ struct mbuf *m_get()
m->m_flags = (flags | M_USEDLIST);
/* Initialise it */
- m->m_size = MSIZE - sizeof(struct m_hdr);
+ m->m_size = SLIRP_MSIZE - sizeof(struct m_hdr);
m->m_data = m->m_dat;
m->m_len = 0;
m->m_nextpkt = 0;
diff --git a/misc.h b/misc.h
index 5de28fe..6932a21 100644
--- a/misc.h
+++ b/misc.h
@@ -17,7 +17,7 @@ struct ex_list {
};
extern struct ex_list *exec_list;
-extern u_int curtime, time_fasttimo, last_slowtimo;
+extern u_int time_fasttimo, last_slowtimo;
extern int(*lprint_print) _P((void *, const char *, va_list));
extern char *lprint_ptr, *lprint_ptr2, **lprint_arg;
diff --git a/slirp_config.h b/slirp_config.h
index 50445f0..b7a62d0 100644
--- a/slirp_config.h
+++ b/slirp_config.h
@@ -129,10 +129,10 @@
#undef HAVE_SYS_STROPTS_H
/* Define to whatever your compiler thinks inline should be */
-#define inline inline
+//#define inline inline
/* Define to whatever your compiler thinks const should be */
-#define const const
+//#define const const
/* Define if your compiler doesn't like prototypes */
#undef NO_PROTOTYPES
@@ -171,7 +171,7 @@
#undef HAVE_SETENV
/* Define if you have index() */
-#undef HAVE_INDEX
+#define HAVE_INDEX
/* Define if you have bcmp() */
#undef HAVE_BCMP
@@ -183,7 +183,7 @@
#define HAVE_MEMMOVE
/* Define if you have gethostid */
-#undef HAVE_GETHOSTID
+#define HAVE_GETHOSTID
/* Define if you DON'T have unix-domain sockets */
#undef NO_UNIX_SOCKETS
diff --git a/socket.c b/socket.c
index 85be543..8247103 100644
--- a/socket.c
+++ b/socket.c
@@ -8,7 +8,6 @@
#define WANT_SYS_IOCTL_H
#include <slirp.h>
#include "ip_icmp.h"
-#include "main.h"
#ifdef __sun__
#include <sys/filio.h>
#endif