mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
vhost-net: compile it on all targets that have virtio-net.
This shows a preexisting bug: if a KVM target did not have virtio-net enabled, it would fail with undefined symbols when vhost was enabled. This must now be fixed, lest targets that have no virtio-net fail to compile. Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <1543851204-41186-5-git-send-email-pbonzini@redhat.com> Message-Id: <1550165756-21617-6-git-send-email-pbonzini@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
ba28889838
commit
af3bba761a
6 changed files with 19 additions and 22 deletions
|
@ -37,8 +37,8 @@ obj-$(CONFIG_PSERIES) += spapr_llan.o
|
|||
obj-$(CONFIG_XILINX_ETHLITE) += xilinx_ethlite.o
|
||||
|
||||
obj-$(CONFIG_VIRTIO_NET) += virtio-net.o
|
||||
obj-$(CONFIG_VHOST_NET) += vhost_net.o
|
||||
common-obj-$(call lnot,$(CONFIG_VHOST_NET)) += vhost_net-stub.o
|
||||
common-obj-$(call land,$(CONFIG_VIRTIO_NET),$(CONFIG_VHOST_NET)) += vhost_net.o
|
||||
common-obj-$(call lnot,$(call land,$(CONFIG_VIRTIO_NET),$(CONFIG_VHOST_NET))) += vhost_net-stub.o
|
||||
common-obj-$(CONFIG_ALL) += vhost_net-stub.o
|
||||
|
||||
obj-$(CONFIG_ETSEC) += fsl_etsec/etsec.o fsl_etsec/registers.o \
|
||||
|
|
|
@ -25,8 +25,6 @@
|
|||
|
||||
|
||||
#include <sys/socket.h>
|
||||
#include <netpacket/packet.h>
|
||||
#include <net/ethernet.h>
|
||||
#include <net/if.h>
|
||||
#include <netinet/in.h>
|
||||
|
||||
|
@ -134,7 +132,7 @@ static int vhost_net_get_fd(NetClientState *backend)
|
|||
return tap_get_fd(backend);
|
||||
default:
|
||||
fprintf(stderr, "vhost-net requires tap backend\n");
|
||||
return -EBADFD;
|
||||
return -ENOSYS;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue