qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] clean build: Add bt-host.h


From: Jan Kiszka
Subject: [Qemu-devel] [PATCH] clean build: Add bt-host.h
Date: Sun, 08 Mar 2009 20:56:13 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666

Aurelien Jarno wrote:
> On Sun, Mar 08, 2009 at 03:56:12PM +0100, Jan Kiszka wrote:
>> Jan Kiszka wrote:
>>> Silence compiler warning by providing a prototype in the CONFIG_BLUEZ
>>> case (hw/bt.h provides it otherwise).
>>>
>>> Signed-off-by: Jan Kiszka <address@hidden>
>>> ---
>>>
>>>  bt-host.c |    2 ++
>>>  1 files changed, 2 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/bt-host.c b/bt-host.c
>>> index 07679f6..066757a 100644
>>> --- a/bt-host.c
>>> +++ b/bt-host.c
>>> @@ -31,6 +31,8 @@
>>>  #  include <bluetooth/bluetooth.h>
>>>  #  include <bluetooth/hci.h>
>>>  #  include <bluetooth/hci_lib.h>
>>> +/* Silence compiler warning */
>>> +struct HCIInfo *bt_host_hci(const char *id);
>>>  # else
>>>  #  include "hw/bt.h"
>>>  #  define HCI_MAX_FRAME_SIZE       1028
>> Thanks for applying the other patches, but this tiny one always seems to
>> be ignored - for unknown reasons. :)
>>
> 
> On my side, I consider that a hack, not a fix. We should make sure the
> correct header is included so that this function is declared.
> 

As always: no comment means no progress. This one better?

-------->

Silence compiler warning by providing proper CONFIG_BLUEZ-independent
header for the bt-host API.

Signed-off-by: Jan Kiszka <address@hidden>
---

 bt-host.c |    1 +
 bt-host.h |    9 +++++++++
 hw/bt.h   |    3 ---
 vl.c      |    1 +
 4 files changed, 11 insertions(+), 3 deletions(-)
 create mode 100644 bt-host.h

diff --git a/bt-host.c b/bt-host.c
index a0dcce7..3701fbd 100644
--- a/bt-host.c
+++ b/bt-host.c
@@ -22,6 +22,7 @@
 #include "qemu-char.h"
 #include "sysemu.h"
 #include "net.h"
+#include "bt-host.h"
 
 #ifndef _WIN32
 # include <errno.h>
diff --git a/bt-host.h b/bt-host.h
new file mode 100644
index 0000000..f1eff65
--- /dev/null
+++ b/bt-host.h
@@ -0,0 +1,9 @@
+#ifndef BT_HOST_H
+#define BT_HOST_H
+
+struct HCIInfo;
+
+/* bt-host.c */
+struct HCIInfo *bt_host_hci(const char *id);
+
+#endif
diff --git a/hw/bt.h b/hw/bt.h
index 2d65e10..726905f 100644
--- a/hw/bt.h
+++ b/hw/bt.h
@@ -112,9 +112,6 @@ void bt_device_done(struct bt_device_s *dev);
 /* bt-hci.c */
 struct HCIInfo *bt_new_hci(struct bt_scatternet_s *net);
 
-/* bt-host.c */
-struct HCIInfo *bt_host_hci(const char *id);
-
 /* bt-vhci.c */
 void bt_vhci_init(struct HCIInfo *info);
 
diff --git a/vl.c b/vl.c
index 06e9f73..c426fb0 100644
--- a/vl.c
+++ b/vl.c
@@ -137,6 +137,7 @@ int main(int argc, char **argv)
 #include "hw/isa.h"
 #include "hw/baum.h"
 #include "hw/bt.h"
+#include "bt-host.h"
 #include "net.h"
 #include "monitor.h"
 #include "console.h"




reply via email to

[Prev in Thread] Current Thread [Next in Thread]