diff options
author | Scott James Remnant <keybuk@google.com> | 2015-04-02 15:22:14 -0700 |
---|---|---|
committer | Scott James Remnant <keybuk@google.com> | 2015-04-02 15:22:14 -0700 |
commit | 933926c92e1378cc76bc9c149107e670c4872d4e (patch) | |
tree | 3799215c0e76bc312085a5bf5f9384557f2e1eba | |
parent | a7e698f5a9e062f62e21bc435643975c30bab846 (diff) | |
download | android_system_bt-933926c92e1378cc76bc9c149107e670c4872d4e.tar.gz android_system_bt-933926c92e1378cc76bc9c149107e670c4872d4e.tar.bz2 android_system_bt-933926c92e1378cc76bc9c149107e670c4872d4e.zip |
Fix missing #includes needed for glibc
Some standard library functions are used while relying on bionic headers
including the headers the functions were actually declared on. Add those
missing #includes so that bluetooth.default.so will compile on glibc.
Change-Id: Ied9f89ce5a05911fca63f6bfe1b8cc8196ab3b1c
43 files changed, 59 insertions, 0 deletions
diff --git a/bta/ag/bta_ag_sco.c b/bta/ag/bta_ag_sco.c index 4261621f3..42fd82f77 100644 --- a/bta/ag/bta_ag_sco.c +++ b/bta/ag/bta_ag_sco.c @@ -22,6 +22,7 @@ * ******************************************************************************/ +#include <stddef.h> #include "bta_api.h" #include "bta_ag_api.h" #include "bta_ag_co.h" diff --git a/bta/dm/bta_dm_cfg.c b/bta/dm/bta_dm_cfg.c index 02f29e6cd..afa54d7e5 100644 --- a/bta/dm/bta_dm_cfg.c +++ b/bta/dm/bta_dm_cfg.c @@ -23,6 +23,7 @@ * ******************************************************************************/ +#include <stddef.h> #include "bt_target.h" #include "bta_sys.h" #include "bta_api.h" diff --git a/bta/hl/bta_hl_ci.c b/bta/hl/bta_hl_ci.c index 46deee3dc..652a5c515 100644 --- a/bta/hl/bta_hl_ci.c +++ b/bta/hl/bta_hl_ci.c @@ -22,6 +22,7 @@ * subsystem call-in functions. * ******************************************************************************/ +#include <stddef.h> #include "bta_api.h" #include "btm_api.h" #include "bta_sys.h" diff --git a/bta/mce/bta_mce_main.c b/bta/mce/bta_mce_main.c index f313eb092..a0536ff9f 100644 --- a/bta/mce/bta_mce_main.c +++ b/bta/mce/bta_mce_main.c @@ -23,6 +23,7 @@ * ******************************************************************************/ +#include <stddef.h> #include "bta_api.h" #include "bta_sys.h" #include "bta_mce_api.h" diff --git a/bta/sys/bta_sys_conn.c b/bta/sys/bta_sys_conn.c index eed79d02e..087a9ff75 100644 --- a/bta/sys/bta_sys_conn.c +++ b/bta/sys/bta_sys_conn.c @@ -22,6 +22,7 @@ * ******************************************************************************/ +#include <stddef.h> #include "bta_api.h" #include "bta_sys.h" #include "bta_sys_int.h" diff --git a/bta/sys/utl.c b/bta/sys/utl.c index 4bb1d9521..c2b0b4ce5 100644 --- a/bta/sys/utl.c +++ b/bta/sys/utl.c @@ -21,6 +21,7 @@ * This file contains utility functions. * ******************************************************************************/ +#include <stddef.h> #include "utl.h" #include "gki.h" #include "btm_api.h" diff --git a/btcore/src/property.c b/btcore/src/property.c index ddefb682a..ca4df5c18 100644 --- a/btcore/src/property.c +++ b/btcore/src/property.c @@ -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" diff --git a/btif/co/bta_gatts_co.c b/btif/co/bta_gatts_co.c index ae4272dc4..e1263d7d6 100644 --- a/btif/co/bta_gatts_co.c +++ b/btif/co/bta_gatts_co.c @@ -22,6 +22,7 @@ #if( defined BTA_GATT_INCLUDED ) && (BTA_GATT_INCLUDED == TRUE) #include <stdlib.h> +#include <string.h> #include "gki.h" #include "bta_gatts_co.h" #include "btif_util.h" diff --git a/btif/co/bta_hh_co.c b/btif/co/bta_hh_co.c index 4edf52b4a..3ab225567 100644 --- a/btif/co/bta_hh_co.c +++ b/btif/co/bta_hh_co.c @@ -26,6 +26,7 @@ #include <string.h> #include <stdint.h> #include <errno.h> +#include <unistd.h> #include <linux/uhid.h> #include "btif_hh.h" #include "bta_api.h" diff --git a/btif/include/btif_sock_sdp.h b/btif/include/btif_sock_sdp.h index d374d72cd..857c2fba2 100644 --- a/btif/include/btif_sock_sdp.h +++ b/btif/include/btif_sock_sdp.h @@ -19,6 +19,8 @@ #ifndef BTIF_SOCK_SDP_H #define BTIF_SOCK_SDP_H +#include <string.h> + static const uint8_t UUID_OBEX_OBJECT_PUSH[] = {0x00, 0x00, 0x11, 0x05, 0x00, 0x00, 0x10, 0x00, 0x80, 0x00, 0x00, 0x80, 0x5F, 0x9B, 0x34, 0xFB}; static const uint8_t UUID_PBAP_PSE[] = {0x00, 0x00, 0x11, 0x2F, 0x00, 0x00, 0x10, 0x00, diff --git a/btif/src/bluetooth.c b/btif/src/bluetooth.c index 18d03390b..075e9cf86 100644 --- a/btif/src/bluetooth.c +++ b/btif/src/bluetooth.c @@ -26,6 +26,7 @@ #include <stdio.h> #include <stdlib.h> +#include <string.h> #include <unistd.h> #include <hardware/bluetooth.h> diff --git a/btif/src/btif_dm.c b/btif/src/btif_dm.c index b11b3648b..9268a7096 100644 --- a/btif/src/btif_dm.c +++ b/btif/src/btif_dm.c @@ -27,8 +27,11 @@ #define LOG_TAG "bt_btif_dm" +#include <signal.h> #include <stdio.h> #include <stdlib.h> +#include <string.h> +#include <sys/types.h> #include <unistd.h> #include <hardware/bluetooth.h> diff --git a/btif/src/btif_gatt_multi_adv_util.c b/btif/src/btif_gatt_multi_adv_util.c index b9d8bff17..ed564ff05 100644 --- a/btif/src/btif_gatt_multi_adv_util.c +++ b/btif/src/btif_gatt_multi_adv_util.c @@ -27,6 +27,7 @@ #include <stdio.h> #include <stdlib.h> +#include <string.h> #include "btu.h" #include "bt_target.h" diff --git a/btif/src/btif_hf.c b/btif/src/btif_hf.c index 25ced488a..dc1703df4 100644 --- a/btif/src/btif_hf.c +++ b/btif/src/btif_hf.c @@ -28,6 +28,7 @@ #include <hardware/bluetooth.h> #include <hardware/bt_hf.h> #include <stdlib.h> +#include <string.h> #define LOG_TAG "bt_btif_hf" #include "btif_common.h" diff --git a/btif/src/btif_hf_client.c b/btif/src/btif_hf_client.c index 7bc2d9adb..e0a0b8dd1 100644 --- a/btif/src/btif_hf_client.c +++ b/btif/src/btif_hf_client.c @@ -29,6 +29,7 @@ #include <hardware/bluetooth.h> #include <hardware/bt_hf_client.h> #include <stdlib.h> +#include <string.h> #include <cutils/properties.h> #define LOG_TAG "bt_btif_hfc" diff --git a/btif/src/btif_mce.c b/btif/src/btif_mce.c index bf4c3bd1b..c50ef8bd0 100644 --- a/btif/src/btif_mce.c +++ b/btif/src/btif_mce.c @@ -29,6 +29,7 @@ #include <hardware/bluetooth.h> #include <hardware/bt_mce.h> #include <stdlib.h> +#include <string.h> #define LOG_TAG "bt_btif_mce" #include "btif_common.h" diff --git a/btif/src/btif_pan.c b/btif/src/btif_pan.c index d7228c313..40642c8ad 100644 --- a/btif/src/btif_pan.c +++ b/btif/src/btif_pan.c @@ -35,6 +35,7 @@ #include <netinet/in.h> #include <netdb.h> #include <stdio.h> +#include <string.h> #include <errno.h> #include <fcntl.h> #include <sys/socket.h> diff --git a/btif/src/btif_profile_queue.c b/btif/src/btif_profile_queue.c index 87a008cf6..9fbd71a91 100644 --- a/btif/src/btif_profile_queue.c +++ b/btif/src/btif_profile_queue.c @@ -25,6 +25,7 @@ ******************************************************************************/ #include <assert.h> +#include <string.h> #include <hardware/bluetooth.h> #define LOG_TAG "bt_btif_queue" diff --git a/btif/src/btif_rc.c b/btif/src/btif_rc.c index 80a10da98..341356fcb 100644 --- a/btif/src/btif_rc.c +++ b/btif/src/btif_rc.c @@ -26,6 +26,7 @@ *****************************************************************************/ #include <hardware/bluetooth.h> #include <fcntl.h> +#include <string.h> #include "bta_api.h" #include "bta_av_api.h" #include "avrc_defs.h" diff --git a/btif/src/btif_sock_rfc.c b/btif/src/btif_sock_rfc.c index 1cd25a390..4b9040ebe 100644 --- a/btif/src/btif_sock_rfc.c +++ b/btif/src/btif_sock_rfc.c @@ -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> diff --git a/btif/src/btif_sock_sco.c b/btif/src/btif_sock_sco.c index 2c6be49d3..fafb45299 100644 --- a/btif/src/btif_sock_sco.c +++ b/btif/src/btif_sock_sco.c @@ -19,8 +19,10 @@ #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> diff --git a/embdrv/sbc/encoder/include/sbc_types.h b/embdrv/sbc/encoder/include/sbc_types.h index 991fc7dcc..c215e6896 100644 --- a/embdrv/sbc/encoder/include/sbc_types.h +++ b/embdrv/sbc/encoder/include/sbc_types.h @@ -25,6 +25,8 @@ #ifndef SBC_TYPES_H #define SBC_TYPES_H +#include <stdint.h> + #ifdef BUILDCFG #include "bt_target.h" #endif diff --git a/gki/common/gki_buffer.c b/gki/common/gki_buffer.c index 78f08d90f..893d19f6a 100644 --- a/gki/common/gki_buffer.c +++ b/gki/common/gki_buffer.c @@ -17,6 +17,7 @@ ******************************************************************************/ #include <assert.h> +#include <stdlib.h> #include "osi/include/allocator.h" #include "gki_int.h" diff --git a/gki/ulinux/gki_ulinux.c b/gki/ulinux/gki_ulinux.c index c928fbd60..72ad479e0 100644 --- a/gki/ulinux/gki_ulinux.c +++ b/gki/ulinux/gki_ulinux.c @@ -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" diff --git a/hci/src/btsnoop.c b/hci/src/btsnoop.c index 869b075ca..d09dfcbb6 100644 --- a/hci/src/btsnoop.c +++ b/hci/src/btsnoop.c @@ -21,9 +21,12 @@ #include <assert.h> #include <errno.h> #include <fcntl.h> +#include <limits.h> +#include <netinet/in.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> +#include <string.h> #include <sys/stat.h> #include <sys/time.h> #include <unistd.h> diff --git a/hci/src/hci_hal_h4.c b/hci/src/hci_hal_h4.c index 368b1aa94..836937d45 100644 --- a/hci/src/hci_hal_h4.c +++ b/hci/src/hci_hal_h4.c @@ -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" diff --git a/hci/src/hci_hal_mct.c b/hci/src/hci_hal_mct.c index d831e9314..9b3707c7f 100644 --- a/hci/src/hci_hal_mct.c +++ b/hci/src/hci_hal_mct.c @@ -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" diff --git a/hci/src/hci_inject.c b/hci/src/hci_inject.c index 0ec4f8286..169295bbe 100644 --- a/hci/src/hci_inject.c +++ b/hci/src/hci_inject.c @@ -20,6 +20,7 @@ #include <assert.h> #include <errno.h> +#include <string.h> #include "osi/include/allocator.h" #include "bt_types.h" diff --git a/hci/src/hci_layer.c b/hci/src/hci_layer.c index ea7a497dc..d73c42d6c 100644 --- a/hci/src/hci_layer.c +++ b/hci/src/hci_layer.c @@ -20,6 +20,9 @@ #include <assert.h> #include <cutils/properties.h> +#include <signal.h> +#include <string.h> +#include <sys/types.h> #include "buffer_allocator.h" #include "btsnoop.h" diff --git a/hci/src/packet_fragmenter.c b/hci/src/packet_fragmenter.c index b09cf08ab..de6366809 100644 --- a/hci/src/packet_fragmenter.c +++ b/hci/src/packet_fragmenter.c @@ -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" diff --git a/osi/include/allocation_tracker.h b/osi/include/allocation_tracker.h index fb9781b55..b9fa59405 100644 --- a/osi/include/allocation_tracker.h +++ b/osi/include/allocation_tracker.h @@ -20,6 +20,7 @@ #include <stdbool.h> #include <stddef.h> +#include <stdint.h> typedef struct allocation_tracker_t allocation_tracker_t; typedef uint8_t allocator_id_t; diff --git a/osi/src/alarm.c b/osi/src/alarm.c index 42c3da159..225948d66 100644 --- a/osi/src/alarm.c +++ b/osi/src/alarm.c @@ -22,6 +22,8 @@ #include <errno.h> #include <hardware/bluetooth.h> #include <inttypes.h> +#include <signal.h> +#include <string.h> #include <time.h> #include "osi/include/alarm.h" diff --git a/osi/src/allocation_tracker.c b/osi/src/allocation_tracker.c index 1f8ce22a0..7732d1036 100644 --- a/osi/src/allocation_tracker.c +++ b/osi/src/allocation_tracker.c @@ -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" diff --git a/osi/src/allocator.c b/osi/src/allocator.c index cd291b049..7ebeb5eea 100644 --- a/osi/src/allocator.c +++ b/osi/src/allocator.c @@ -17,6 +17,7 @@ ******************************************************************************/ #include <stdlib.h> +#include <string.h> #include "osi/include/allocator.h" #include "osi/include/allocation_tracker.h" diff --git a/osi/src/array.c b/osi/src/array.c index fb11887fd..c2ef1bc75 100644 --- a/osi/src/array.c +++ b/osi/src/array.c @@ -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" diff --git a/osi/src/config.c b/osi/src/config.c index 1944bb30c..a98faa2e8 100644 --- a/osi/src/config.c +++ b/osi/src/config.c @@ -20,6 +20,7 @@ #include <assert.h> #include <ctype.h> +#include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/osi/src/eager_reader.c b/osi/src/eager_reader.c index f12175457..6f0a88fec 100644 --- a/osi/src/eager_reader.c +++ b/osi/src/eager_reader.c @@ -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" diff --git a/osi/src/reactor.c b/osi/src/reactor.c index 968fe4bba..18f749ce8 100644 --- a/osi/src/reactor.c +++ b/osi/src/reactor.c @@ -22,6 +22,7 @@ #include <errno.h> #include <pthread.h> #include <stdlib.h> +#include <string.h> #include <sys/epoll.h> #include <sys/eventfd.h> diff --git a/osi/test/data_dispatcher_test.cpp b/osi/test/data_dispatcher_test.cpp index b00cfb743..1985fee92 100644 --- a/osi/test/data_dispatcher_test.cpp +++ b/osi/test/data_dispatcher_test.cpp @@ -1,5 +1,7 @@ #include <gtest/gtest.h> +#include <climits> + #include "AllocationTestHarness.h" extern "C" { diff --git a/stack/l2cap/l2cap_client.c b/stack/l2cap/l2cap_client.c index 6e671fcf2..95b8e0131 100644 --- a/stack/l2cap/l2cap_client.c +++ b/stack/l2cap/l2cap_client.c @@ -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" diff --git a/stack/mcap/mca_dact.c b/stack/mcap/mca_dact.c index d147c3906..d30db79fe 100644 --- a/stack/mcap/mca_dact.c +++ b/stack/mcap/mca_dact.c @@ -22,6 +22,7 @@ * Functions. * ******************************************************************************/ +#include <stddef.h> #include "bt_target.h" #include "bt_utils.h" #include "gki.h" diff --git a/stack/rfcomm/rfc_l2cap_if.c b/stack/rfcomm/rfc_l2cap_if.c index ffcbfe94d..d72a40a79 100644 --- a/stack/rfcomm/rfc_l2cap_if.c +++ b/stack/rfcomm/rfc_l2cap_if.c @@ -22,6 +22,7 @@ * ******************************************************************************/ +#include <stddef.h> #include "bt_target.h" #include "btcore/include/counter.h" #include "gki.h" diff --git a/stack/rfcomm/rfc_ts_frames.c b/stack/rfcomm/rfc_ts_frames.c index 11fbae8c1..f546e162b 100644 --- a/stack/rfcomm/rfc_ts_frames.c +++ b/stack/rfcomm/rfc_ts_frames.c @@ -21,6 +21,7 @@ * This file contains functions to send TS 07.10 frames * ******************************************************************************/ +#include <stddef.h> #include "bt_target.h" #include "btcore/include/counter.h" #include "gki.h" |