]> git.proxmox.com Git - mirror_qemu.git/blobdiff - slirp/misc.c
Use #include "..." for our own headers, <...> for others
[mirror_qemu.git] / slirp / misc.c
index 6543dc777298463931ae82fbb94619c8b0ee5902..88e9d94197a6ae28fabc78918c72b65200858c54 100644 (file)
@@ -5,21 +5,17 @@
  * terms and conditions of the copyright.
  */
 
-#include <slirp.h>
-#include <libslirp.h>
-
+#include "qemu/osdep.h"
+#include "slirp.h"
+#include "libslirp.h"
 #include "monitor/monitor.h"
+#include "qemu/error-report.h"
 #include "qemu/main-loop.h"
 
 #ifdef DEBUG
 int slirp_debug = DBG_CALL|DBG_MISC|DBG_ERROR;
 #endif
 
-struct quehead {
-       struct quehead *qh_link;
-       struct quehead *qh_rlink;
-};
-
 inline void
 insque(void *a, void *b)
 {
@@ -63,27 +59,6 @@ int add_exec(struct ex_list **ex_ptr, int do_pty, char *exec,
        return 0;
 }
 
-#ifndef HAVE_STRERROR
-
-/*
- * For systems with no strerror
- */
-
-extern int sys_nerr;
-extern char *sys_errlist[];
-
-char *
-strerror(error)
-       int error;
-{
-       if (error < sys_nerr)
-          return sys_errlist[error];
-       else
-          return "Unknown error.";
-}
-
-#endif
-
 
 #ifdef _WIN32
 
@@ -122,9 +97,9 @@ fork_exec(struct socket *so, const char *ex, int do_pty)
        pid_t pid;
 
        DEBUG_CALL("fork_exec");
-       DEBUG_ARG("so = %lx", (long)so);
-       DEBUG_ARG("ex = %lx", (long)ex);
-       DEBUG_ARG("do_pty = %lx", (long)do_pty);
+       DEBUG_ARG("so = %p", so);
+       DEBUG_ARG("ex = %p", ex);
+       DEBUG_ARG("do_pty = %x", do_pty);
 
        if (do_pty == 2) {
                 return 0;