Commit 2e9b08e59e241fe0119463fc5192e15a6403eded

Authored by balrog
1 parent 9d56d2dc

Disable bluetooth proxy compilation on win32.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5365 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 2 changed files with 25 additions and 18 deletions
bt-host.c
@@ -24,17 +24,18 @@ @@ -24,17 +24,18 @@
24 #include "sysemu.h" 24 #include "sysemu.h"
25 #include "net.h" 25 #include "net.h"
26 26
27 -#include <errno.h>  
28 -#include <sys/ioctl.h>  
29 -#include <sys/uio.h>  
30 -#ifdef CONFIG_BLUEZ  
31 -# include <bluetooth/bluetooth.h>  
32 -# include <bluetooth/hci.h>  
33 -# include <bluetooth/hci_lib.h>  
34 -#else  
35 -# include "hw/bt.h"  
36 -# define HCI_MAX_FRAME_SIZE 1028  
37 -#endif 27 +#ifndef _WIN32
  28 +# include <errno.h>
  29 +# include <sys/ioctl.h>
  30 +# include <sys/uio.h>
  31 +# ifdef CONFIG_BLUEZ
  32 +# include <bluetooth/bluetooth.h>
  33 +# include <bluetooth/hci.h>
  34 +# include <bluetooth/hci_lib.h>
  35 +# else
  36 +# include "hw/bt.h"
  37 +# define HCI_MAX_FRAME_SIZE 1028
  38 +# endif
38 39
39 struct bt_host_hci_s { 40 struct bt_host_hci_s {
40 struct HCIInfo hci; 41 struct HCIInfo hci;
@@ -154,7 +155,7 @@ struct HCIInfo *bt_host_hci(const char *id) @@ -154,7 +155,7 @@ struct HCIInfo *bt_host_hci(const char *id)
154 { 155 {
155 struct bt_host_hci_s *s; 156 struct bt_host_hci_s *s;
156 int fd = -1; 157 int fd = -1;
157 -#ifdef CONFIG_BLUEZ 158 +# ifdef CONFIG_BLUEZ
158 int dev_id = hci_devid(id); 159 int dev_id = hci_devid(id);
159 struct hci_filter flt; 160 struct hci_filter flt;
160 161
@@ -166,7 +167,7 @@ struct HCIInfo *bt_host_hci(const char *id) @@ -166,7 +167,7 @@ struct HCIInfo *bt_host_hci(const char *id)
166 fd = hci_open_dev(dev_id); 167 fd = hci_open_dev(dev_id);
167 168
168 /* XXX: can we ensure nobody else has the device opened? */ 169 /* XXX: can we ensure nobody else has the device opened? */
169 -#endif 170 +# endif
170 171
171 if (fd < 0) { 172 if (fd < 0) {
172 fprintf(stderr, "qemu: Can't open `%s': %s (%i)\n", 173 fprintf(stderr, "qemu: Can't open `%s': %s (%i)\n",
@@ -174,7 +175,7 @@ struct HCIInfo *bt_host_hci(const char *id) @@ -174,7 +175,7 @@ struct HCIInfo *bt_host_hci(const char *id)
174 return 0; 175 return 0;
175 } 176 }
176 177
177 -#ifdef CONFIG_BLUEZ 178 +# ifdef CONFIG_BLUEZ
178 hci_filter_clear(&flt); 179 hci_filter_clear(&flt);
179 hci_filter_all_ptypes(&flt); 180 hci_filter_all_ptypes(&flt);
180 hci_filter_all_events(&flt); 181 hci_filter_all_events(&flt);
@@ -183,7 +184,7 @@ struct HCIInfo *bt_host_hci(const char *id) @@ -183,7 +184,7 @@ struct HCIInfo *bt_host_hci(const char *id)
183 fprintf(stderr, "qemu: Can't set HCI filter on socket (%i)\n", errno); 184 fprintf(stderr, "qemu: Can't set HCI filter on socket (%i)\n", errno);
184 return 0; 185 return 0;
185 } 186 }
186 -#endif 187 +# endif
187 188
188 s = qemu_mallocz(sizeof(struct bt_host_hci_s)); 189 s = qemu_mallocz(sizeof(struct bt_host_hci_s));
189 s->fd = fd; 190 s->fd = fd;
@@ -196,3 +197,11 @@ struct HCIInfo *bt_host_hci(const char *id) @@ -196,3 +197,11 @@ struct HCIInfo *bt_host_hci(const char *id)
196 197
197 return &s->hci; 198 return &s->hci;
198 } 199 }
  200 +#else
  201 +struct HCIInfo *bt_host_hci(const char *id)
  202 +{
  203 + fprintf(stderr, "qemu: bluetooth passthrough not supported (yet)\n", errno);
  204 +
  205 + return 0;
  206 +}
  207 +#endif
bt-vhci.c
@@ -25,9 +25,7 @@ @@ -25,9 +25,7 @@
25 #include "net.h" 25 #include "net.h"
26 #include "hw/bt.h" 26 #include "hw/bt.h"
27 27
28 -#include <sys/uio.h>  
29 -  
30 -#define VHCI_DEV "/dev/vhci" 28 +#define VHCI_DEV "/dev/vhci"
31 #define VHCI_UDEV "/dev/hci_vhci" 29 #define VHCI_UDEV "/dev/hci_vhci"
32 30
33 struct bt_vhci_s { 31 struct bt_vhci_s {