Commit e820e3f4597d52bf0d7f5e53800703001e356d17
1 parent
ada24f84
Make sure bluez programs (cross-)compile, add missing statics.
Spotted by Blue Swirl. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5358 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
2 changed files
with
13 additions
and
3 deletions
configure
@@ -900,8 +900,18 @@ if test "$bluez" = "yes" ; then | @@ -900,8 +900,18 @@ if test "$bluez" = "yes" ; then | ||
900 | `pkg-config bluez` || bluez="no" | 900 | `pkg-config bluez` || bluez="no" |
901 | fi | 901 | fi |
902 | if test "$bluez" = "yes" ; then | 902 | if test "$bluez" = "yes" ; then |
903 | + cat > $TMPC << EOF | ||
904 | +#include <bluetooth/bluetooth.h> | ||
905 | +int main(void) { return bt_error(0); } | ||
906 | +EOF | ||
903 | bluez_cflags=`pkg-config --cflags bluez` | 907 | bluez_cflags=`pkg-config --cflags bluez` |
904 | bluez_libs=`pkg-config --libs bluez` | 908 | bluez_libs=`pkg-config --libs bluez` |
909 | + if $cc $ARCH_CFLAGS -o $TMPE ${OS_FLAGS} $bluez_cflags $TMPC \ | ||
910 | + $bluez_libs 2> /dev/null ; then | ||
911 | + : | ||
912 | + else | ||
913 | + bluez="no" | ||
914 | + fi | ||
905 | fi | 915 | fi |
906 | 916 | ||
907 | ########################################## | 917 | ########################################## |
hw/bt-hci.c
@@ -87,7 +87,7 @@ struct bt_hci_link_s { | @@ -87,7 +87,7 @@ struct bt_hci_link_s { | ||
87 | }; | 87 | }; |
88 | 88 | ||
89 | /* LMP layer emulation */ | 89 | /* LMP layer emulation */ |
90 | -void bt_submit_lmp(struct bt_device_s *bt, int length, uint8_t *data) | 90 | +static void bt_submit_lmp(struct bt_device_s *bt, int length, uint8_t *data) |
91 | { | 91 | { |
92 | int resp, resplen, error, op, tr; | 92 | int resp, resplen, error, op, tr; |
93 | uint8_t respdata[17]; | 93 | uint8_t respdata[17]; |
@@ -2134,7 +2134,7 @@ static int bt_hci_bdaddr_set(struct HCIInfo *info, const uint8_t *bd_addr) | @@ -2134,7 +2134,7 @@ static int bt_hci_bdaddr_set(struct HCIInfo *info, const uint8_t *bd_addr) | ||
2134 | return 0; | 2134 | return 0; |
2135 | } | 2135 | } |
2136 | 2136 | ||
2137 | -void bt_hci_done(struct HCIInfo *info); | 2137 | +static void bt_hci_done(struct HCIInfo *info); |
2138 | static void bt_hci_destroy(struct bt_device_s *dev) | 2138 | static void bt_hci_destroy(struct bt_device_s *dev) |
2139 | { | 2139 | { |
2140 | struct bt_hci_s *hci = hci_from_device(dev); | 2140 | struct bt_hci_s *hci = hci_from_device(dev); |
@@ -2181,7 +2181,7 @@ struct HCIInfo *bt_new_hci(struct bt_scatternet_s *net) | @@ -2181,7 +2181,7 @@ struct HCIInfo *bt_new_hci(struct bt_scatternet_s *net) | ||
2181 | return &s->info; | 2181 | return &s->info; |
2182 | } | 2182 | } |
2183 | 2183 | ||
2184 | -void bt_hci_done(struct HCIInfo *info) | 2184 | +static void bt_hci_done(struct HCIInfo *info) |
2185 | { | 2185 | { |
2186 | struct bt_hci_s *hci = hci_from_info(info); | 2186 | struct bt_hci_s *hci = hci_from_info(info); |
2187 | int handle; | 2187 | int handle; |