OSDN Git Service

Fix build issues in bluedroid on master
authorEtan Cohen <etancohen@google.com>
Wed, 1 Apr 2015 00:15:53 +0000 (17:15 -0700)
committerEtan Cohen <etancohen@google.com>
Wed, 1 Apr 2015 00:51:43 +0000 (17:51 -0700)
Change-Id: I0d3e93ea61dd03505fe9db902ed90bdd4141cab2

22 files changed:
btcore/src/property.c
btif/co/bta_hh_co.c
btif/include/btif_sock_util.h
btif/src/btif_sock_rfc.c
btif/src/btif_sock_sco.c
btif/src/btif_sock_sdp.c
gki/common/gki_buffer.c
gki/ulinux/gki_ulinux.c
hci/src/btsnoop.c
hci/src/hci_hal_h4.c
hci/src/hci_hal_mct.c
hci/src/hci_inject.c
hci/src/hci_layer.c
hci/src/packet_fragmenter.c
osi/src/allocation_tracker.c
osi/src/allocator.c
osi/src/array.c
osi/src/eager_reader.c
osi/src/fixed_queue.c
osi/src/list.c
osi/src/reactor.c
stack/l2cap/l2cap_client.c

index ddefb68..ca4df5c 100644 (file)
@@ -17,6 +17,7 @@
  ******************************************************************************/
 
 #include <assert.h>
+#include <string.h>
 #include "btcore/include/bdaddr.h"
 #include "btcore/include/device_class.h"
 #include "btcore/include/property.h"
index 4edf52b..5ca4fc3 100644 (file)
@@ -27,6 +27,7 @@
 #include <stdint.h>
 #include <errno.h>
 #include <linux/uhid.h>
+#include <unistd.h>
 #include "btif_hh.h"
 #include "bta_api.h"
 #include "bta_hh_api.h"
index 0659930..6e504f9 100644 (file)
@@ -45,16 +45,22 @@ static inline void init_slot_lock( pthread_mutex_t* mutex)
 
 static inline void lock_slot(pthread_mutex_t* mutex)
 {
-    if(mutex->value)
+    // TODO: Commented out since definition of pthread_mutext_t changed to remove value.
+    // Check is for a programming error - however, should re-implement if there's a 
+    // solution.
+    //if(mutex->value)
         pthread_mutex_lock(mutex);
-    else LOG_ERROR("mutex: %p is not initialized", mutex);
+    //else LOG_ERROR("mutex: %p is not initialized", mutex);
 }
 
 static inline void unlock_slot(pthread_mutex_t* mutex)
 {
-   if(mutex->value)
+    // TODO: Commented out since definition of pthread_mutext_t changed to remove value.
+    // Check is for a programming error - however, should re-implement if there's a 
+    // solution.
+    //if(mutex->value)
         pthread_mutex_unlock(mutex);
-   else LOG_ERROR("mutex: %p is not initialized", mutex);
+    //else LOG_ERROR("mutex: %p is not initialized", mutex);
 }
 
 void dump_bin(const char* title, const char* data, int size);
index 1cd25a3..4b9040e 100644 (file)
@@ -22,6 +22,7 @@
 #include <errno.h>
 #include <hardware/bluetooth.h>
 #include <hardware/bt_sock.h>
+#include <string.h>
 #include <sys/ioctl.h>
 #include <sys/socket.h>
 #include <sys/types.h>
index 2c6be49..fafb452 100644 (file)
 #define LOG_TAG "bt_btif_sock_sco"
 
 #include <assert.h>
+#include <errno.h>
 #include <hardware/bluetooth.h>
 #include <hardware/bt_sock.h>
+#include <string.h>
 #include <sys/socket.h>
 #include <sys/types.h>
 
index 1fcae8f..5e833a6 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <stdint.h>
 #include <stdbool.h>
+#include <string.h>
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <errno.h>
index 78f08d9..893d19f 100644 (file)
@@ -17,6 +17,7 @@
  ******************************************************************************/
 
 #include <assert.h>
+#include <stdlib.h>
 
 #include "osi/include/allocator.h"
 #include "gki_int.h"
index c928fbd..72ad479 100644 (file)
@@ -19,7 +19,9 @@
 #define LOG_TAG "bt_gki"
 
 #include <assert.h>
+#include <errno.h>
 #include <pthread.h>
+#include <string.h>
 #include <time.h>
 
 #include "btcore/include/module.h"
index 869b075..011d926 100644 (file)
 
 #define LOG_TAG "bt_snoop"
 
+#include <arpa/inet.h>
 #include <assert.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <stdbool.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <unistd.h>
index 368b1aa..836937d 100644 (file)
@@ -19,6 +19,8 @@
 #define LOG_TAG "bt_hci_h4"
 
 #include <assert.h>
+#include <errno.h>
+#include <string.h>
 
 #include "osi/include/eager_reader.h"
 #include "hci_hal.h"
index d831e93..9b3707c 100644 (file)
@@ -19,6 +19,8 @@
 #define LOG_TAG "bt_hci_mct"
 
 #include <assert.h>
+#include <errno.h>
+#include <string.h>
 
 #include "bt_vendor_lib.h"
 #include "osi/include/eager_reader.h"
index 0ec4f82..169295b 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <assert.h>
 #include <errno.h>
+#include <string.h>
 
 #include "osi/include/allocator.h"
 #include "bt_types.h"
index e78f468..37c674d 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <assert.h>
 #include <cutils/properties.h>
+#include <string.h>
 
 #include "buffer_allocator.h"
 #include "btsnoop.h"
index b09cf08..de63668 100644 (file)
@@ -19,6 +19,7 @@
 #define LOG_TAG "bt_hci_packet_fragmenter"
 
 #include <assert.h>
+#include <string.h>
 
 #include "buffer_allocator.h"
 #include "device/include/controller.h"
index baa820b..381d5ea 100644 (file)
@@ -21,6 +21,8 @@
 #include <assert.h>
 #include <pthread.h>
 #include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
 
 #include "osi/include/allocation_tracker.h"
 #include "osi/include/allocator.h"
index cd291b0..7ebeb5e 100644 (file)
@@ -17,6 +17,7 @@
  ******************************************************************************/
 
 #include <stdlib.h>
+#include <string.h>
 
 #include "osi/include/allocator.h"
 #include "osi/include/allocation_tracker.h"
index fb11887..c2ef1bc 100644 (file)
@@ -19,6 +19,8 @@
 #define LOG_TAG "bt_osi_array"
 
 #include <assert.h>
+#include <stdlib.h>
+#include <string.h>
 
 #include "osi/include/allocator.h"
 #include "osi/include/array.h"
index f121754..6f0a88f 100644 (file)
@@ -21,6 +21,7 @@
 #include <assert.h>
 #include <errno.h>
 #include <stddef.h>
+#include <string.h>
 #include <sys/eventfd.h>
 
 #include "osi/include/allocator.h"
index c83c516..009e185 100644 (file)
@@ -27,7 +27,7 @@
 #include "osi/include/semaphore.h"
 #include "osi/include/reactor.h"
 
-struct fixed_queue_t {
+typedef struct fixed_queue_t {
   list_t *list;
   semaphore_t *enqueue_sem;
   semaphore_t *dequeue_sem;
index 75f948e..f5f5889 100644 (file)
@@ -9,7 +9,7 @@ struct list_node_t {
   void *data;
 };
 
-struct list_t {
+typedef struct list_t {
   list_node_t *head;
   list_node_t *tail;
   size_t length;
index 968fe4b..18f749c 100644 (file)
@@ -22,6 +22,7 @@
 #include <errno.h>
 #include <pthread.h>
 #include <stdlib.h>
+#include <string.h>
 #include <sys/epoll.h>
 #include <sys/eventfd.h>
 
index 6e671fc..95b8e01 100644 (file)
@@ -19,6 +19,7 @@
 #define LOG_TAG "bt_l2cap_client"
 
 #include <assert.h>
+#include <string.h>
 
 #include "btcore/include/bdaddr.h"
 #include "gki/common/gki.h"