mirror of https://github.com/xemu-project/xemu.git
Disable bluetooth proxy compilation on win32.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5365 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
9d56d2dce6
commit
2e9b08e59e
39
bt-host.c
39
bt-host.c
|
@ -24,17 +24,18 @@
|
||||||
#include "sysemu.h"
|
#include "sysemu.h"
|
||||||
#include "net.h"
|
#include "net.h"
|
||||||
|
|
||||||
#include <errno.h>
|
#ifndef _WIN32
|
||||||
#include <sys/ioctl.h>
|
# include <errno.h>
|
||||||
#include <sys/uio.h>
|
# include <sys/ioctl.h>
|
||||||
#ifdef CONFIG_BLUEZ
|
# include <sys/uio.h>
|
||||||
# include <bluetooth/bluetooth.h>
|
# ifdef CONFIG_BLUEZ
|
||||||
# include <bluetooth/hci.h>
|
# include <bluetooth/bluetooth.h>
|
||||||
# include <bluetooth/hci_lib.h>
|
# include <bluetooth/hci.h>
|
||||||
#else
|
# include <bluetooth/hci_lib.h>
|
||||||
# include "hw/bt.h"
|
# else
|
||||||
# define HCI_MAX_FRAME_SIZE 1028
|
# include "hw/bt.h"
|
||||||
#endif
|
# define HCI_MAX_FRAME_SIZE 1028
|
||||||
|
# endif
|
||||||
|
|
||||||
struct bt_host_hci_s {
|
struct bt_host_hci_s {
|
||||||
struct HCIInfo hci;
|
struct HCIInfo hci;
|
||||||
|
@ -154,7 +155,7 @@ struct HCIInfo *bt_host_hci(const char *id)
|
||||||
{
|
{
|
||||||
struct bt_host_hci_s *s;
|
struct bt_host_hci_s *s;
|
||||||
int fd = -1;
|
int fd = -1;
|
||||||
#ifdef CONFIG_BLUEZ
|
# ifdef CONFIG_BLUEZ
|
||||||
int dev_id = hci_devid(id);
|
int dev_id = hci_devid(id);
|
||||||
struct hci_filter flt;
|
struct hci_filter flt;
|
||||||
|
|
||||||
|
@ -166,7 +167,7 @@ struct HCIInfo *bt_host_hci(const char *id)
|
||||||
fd = hci_open_dev(dev_id);
|
fd = hci_open_dev(dev_id);
|
||||||
|
|
||||||
/* XXX: can we ensure nobody else has the device opened? */
|
/* XXX: can we ensure nobody else has the device opened? */
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
fprintf(stderr, "qemu: Can't open `%s': %s (%i)\n",
|
fprintf(stderr, "qemu: Can't open `%s': %s (%i)\n",
|
||||||
|
@ -174,7 +175,7 @@ struct HCIInfo *bt_host_hci(const char *id)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_BLUEZ
|
# ifdef CONFIG_BLUEZ
|
||||||
hci_filter_clear(&flt);
|
hci_filter_clear(&flt);
|
||||||
hci_filter_all_ptypes(&flt);
|
hci_filter_all_ptypes(&flt);
|
||||||
hci_filter_all_events(&flt);
|
hci_filter_all_events(&flt);
|
||||||
|
@ -183,7 +184,7 @@ struct HCIInfo *bt_host_hci(const char *id)
|
||||||
fprintf(stderr, "qemu: Can't set HCI filter on socket (%i)\n", errno);
|
fprintf(stderr, "qemu: Can't set HCI filter on socket (%i)\n", errno);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
# endif
|
||||||
|
|
||||||
s = qemu_mallocz(sizeof(struct bt_host_hci_s));
|
s = qemu_mallocz(sizeof(struct bt_host_hci_s));
|
||||||
s->fd = fd;
|
s->fd = fd;
|
||||||
|
@ -196,3 +197,11 @@ struct HCIInfo *bt_host_hci(const char *id)
|
||||||
|
|
||||||
return &s->hci;
|
return &s->hci;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
struct HCIInfo *bt_host_hci(const char *id)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "qemu: bluetooth passthrough not supported (yet)\n", errno);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue