]> git.proxmox.com Git - qemu.git/commitdiff
Fix some SLIRP warnings
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>
Mon, 12 Jan 2009 17:51:06 +0000 (17:51 +0000)
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>
Mon, 12 Jan 2009 17:51:06 +0000 (17:51 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6272 c046a42c-6fe2-441c-8c8c-71466251a162

slirp/main.h
slirp/slirp.c
slirp/tcp_subr.c

index b4926147d8ea1df97219eb45673f2a896b9b93af..ed5138559917a632bc409ff397ec9cf31c928cfb 100644 (file)
@@ -44,7 +44,7 @@ extern int towrite_max;
 extern int ppp_exit;
 extern int tcp_keepintvl;
 extern uint8_t client_ethaddr[6];
-extern char *slirp_special_ip;
+extern const char *slirp_special_ip;
 extern int slirp_restrict;
 
 #define PROTO_SLIP 0x1
index c1361ab108d56efdd31f6a2456183bb5cde09aad..b4a04c42504bd25fee396c2ed71a508cf3ef5192 100644 (file)
@@ -22,6 +22,7 @@
  * THE SOFTWARE.
  */
 #include "qemu-common.h"
+#include "qemu-char.h"
 #include "slirp.h"
 #include "hw/hw.h"
 
@@ -47,7 +48,7 @@ static struct in_addr client_ipaddr;
 
 static const uint8_t zero_ethaddr[6] = { 0, 0, 0, 0, 0, 0 };
 
-char *slirp_special_ip = CTL_SPECIAL;
+const char *slirp_special_ip = CTL_SPECIAL;
 int slirp_restrict;
 int do_slowtimo;
 int link_up;
@@ -809,7 +810,7 @@ void slirp_socket_recv(int addr_low_byte, int guest_port, const uint8_t *buf,
     if (!so)
         return;
 
-    ret = soreadbuf(so, buf, size);
+    ret = soreadbuf(so, (const char *)buf, size);
 
     if (ret > 0)
         tcp_output(sototcpcb(so));
@@ -1031,7 +1032,7 @@ static int slirp_state_load(QEMUFile *f, void *opaque, int version_id)
         if (!ex_ptr)
             return -EINVAL;
 
-        so->extra = ex_ptr->ex_exec;
+        so->extra = (void *)ex_ptr->ex_exec;
     }
 
     return 0;
index 12abebeb9608ca9aa02daeba79cbcb78d830afae..00f61c16147f3cea08b4baa9e65c0f97100d1d55 100644 (file)
@@ -1283,7 +1283,7 @@ tcp_ctl(so)
                            command == ex_ptr->ex_addr) {
                                if (ex_ptr->ex_pty == 3) {
                                        so->s = -1;
-                                       so->extra = ex_ptr->ex_exec;
+                                       so->extra = (void *)ex_ptr->ex_exec;
                                        return 1;
                                }
                                do_pty = ex_ptr->ex_pty;