Commit 2e9b08e59e241fe0119463fc5192e15a6403eded
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 | 24 | #include "sysemu.h" |
25 | 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 | 40 | struct bt_host_hci_s { |
40 | 41 | struct HCIInfo hci; |
... | ... | @@ -154,7 +155,7 @@ struct HCIInfo *bt_host_hci(const char *id) |
154 | 155 | { |
155 | 156 | struct bt_host_hci_s *s; |
156 | 157 | int fd = -1; |
157 | -#ifdef CONFIG_BLUEZ | |
158 | +# ifdef CONFIG_BLUEZ | |
158 | 159 | int dev_id = hci_devid(id); |
159 | 160 | struct hci_filter flt; |
160 | 161 | |
... | ... | @@ -166,7 +167,7 @@ struct HCIInfo *bt_host_hci(const char *id) |
166 | 167 | fd = hci_open_dev(dev_id); |
167 | 168 | |
168 | 169 | /* XXX: can we ensure nobody else has the device opened? */ |
169 | -#endif | |
170 | +# endif | |
170 | 171 | |
171 | 172 | if (fd < 0) { |
172 | 173 | fprintf(stderr, "qemu: Can't open `%s': %s (%i)\n", |
... | ... | @@ -174,7 +175,7 @@ struct HCIInfo *bt_host_hci(const char *id) |
174 | 175 | return 0; |
175 | 176 | } |
176 | 177 | |
177 | -#ifdef CONFIG_BLUEZ | |
178 | +# ifdef CONFIG_BLUEZ | |
178 | 179 | hci_filter_clear(&flt); |
179 | 180 | hci_filter_all_ptypes(&flt); |
180 | 181 | hci_filter_all_events(&flt); |
... | ... | @@ -183,7 +184,7 @@ struct HCIInfo *bt_host_hci(const char *id) |
183 | 184 | fprintf(stderr, "qemu: Can't set HCI filter on socket (%i)\n", errno); |
184 | 185 | return 0; |
185 | 186 | } |
186 | -#endif | |
187 | +# endif | |
187 | 188 | |
188 | 189 | s = qemu_mallocz(sizeof(struct bt_host_hci_s)); |
189 | 190 | s->fd = fd; |
... | ... | @@ -196,3 +197,11 @@ struct HCIInfo *bt_host_hci(const char *id) |
196 | 197 | |
197 | 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 | ... | ... |