[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 23/26] main-loop: do not include slirp/slirp.h, use l
From: |
Michael Tokarev |
Subject: |
[Qemu-devel] [PULL 23/26] main-loop: do not include slirp/slirp.h, use libslirp.h instead |
Date: |
Fri, 14 Jun 2013 14:50:39 +0400 |
The header slirp/slirp.h is an internal header for slirp, and
main-loop.c does not use internals from there. Instead, it uses
public functions (slirp_update_timeout(), slirp_pollfds_fill()
etc) which are declared in slirp/libslirp.h.
Including slirp/slirp.h is somewhat dangerous since it redefines
errno on WIN32, so any file including it may misbehave wrt errno.
Unfortunately libslirp isn't self-contained, it needs declaration
of struct in_addr, which is provided by qemu/sockets.h. Maybe
instead of #including qemu/sockets.h before libslirp.h, it is
better to make the latter self-contained.
Signed-off-by: Michael Tokarev <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
---
main-loop.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/main-loop.c b/main-loop.c
index cf36645..a44fff6 100644
--- a/main-loop.c
+++ b/main-loop.c
@@ -24,7 +24,8 @@
#include "qemu-common.h"
#include "qemu/timer.h"
-#include "slirp/slirp.h"
+#include "qemu/sockets.h" // struct in_addr needed for libslirp.h
+#include "slirp/libslirp.h"
#include "qemu/main-loop.h"
#include "block/aio.h"
--
1.7.10.4
- [Qemu-devel] [PULL 03/26] configure: remove ${config_host_ld} variable, (continued)
- [Qemu-devel] [PULL 03/26] configure: remove ${config_host_ld} variable, Michael Tokarev, 2013/06/14
- [Qemu-devel] [PULL 05/26] intc/xilinx_intc: Use qemu_set_irq, Michael Tokarev, 2013/06/14
- [Qemu-devel] [PULL 04/26] configure: Disable host-bsd USB on FreeBSD, Michael Tokarev, 2013/06/14
- Re: [Qemu-devel] [PULL 00/26] Trivial-patches pull request for 2013-06-14, Michael Tokarev, 2013/06/14
- [Qemu-devel] [PULL 12/26] Makefile: Install qemu-img and qemu-nbd man pages only if built, Michael Tokarev, 2013/06/14
- [Qemu-devel] [PULL 19/26] KVM: S390: Add dummy kvm_arch_init_irq_routing(), Michael Tokarev, 2013/06/14
- [Qemu-devel] [PULL 11/26] Unbreak -no-quit for GTK, validate SDL options, Michael Tokarev, 2013/06/14
- [Qemu-devel] [PULL 25/26] cputlb: fix debug logs, Michael Tokarev, 2013/06/14
- [Qemu-devel] [PULL 13/26] device tree: Fix cppcheck warning, Michael Tokarev, 2013/06/14
- [Qemu-devel] [PULL 06/26] curl: Whitespace only changes., Michael Tokarev, 2013/06/14
- [Qemu-devel] [PULL 23/26] main-loop: do not include slirp/slirp.h, use libslirp.h instead,
Michael Tokarev <=
- [Qemu-devel] [PULL 10/26] gtk: implement -full-screen, Michael Tokarev, 2013/06/14
- [Qemu-devel] [PULL 14/26] hw/scsi: Don't increment a boolean value, Michael Tokarev, 2013/06/14
- [Qemu-devel] [PULL 15/26] target-sparc: Replace free by g_free, Michael Tokarev, 2013/06/14
- [Qemu-devel] [PULL 16/26] hw/xen: Use g_free instead of free and fix potential memory leaks, Michael Tokarev, 2013/06/14
- [Qemu-devel] [PULL 24/26] create qemu_openpty_raw() helper function and move it to a separate file, Michael Tokarev, 2013/06/14
- [Qemu-devel] [PULL 17/26] ivshmem: add missing error exit(2), Michael Tokarev, 2013/06/14
- [Qemu-devel] [PULL 26/26] piix: fix some printf errors when debug is enabled, Michael Tokarev, 2013/06/14
- [Qemu-devel] [PULL 09/26] char/serial: serial_ioport_write: Factor out common code, Michael Tokarev, 2013/06/14
- [Qemu-devel] [PULL 20/26] KVM: PPC: Add dummy kvm_arch_init_irq_routing(), Michael Tokarev, 2013/06/14
- [Qemu-devel] [PULL 07/26] char/serial: cosmetic fixes., Michael Tokarev, 2013/06/14