From 261948090e9073514ac4b5f64c8715cf0a71eafa Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Thu, 6 Dec 2018 21:28:18 +0100 Subject: build: Move declaration of _GNU_SOURCE back into individual source files --- android/avdtptest.c | 1 + android/avrcp-lib.c | 1 + android/bluetooth.c | 4 ++-- android/client/haltest.c | 1 + android/client/if-audio.c | 1 + android/client/if-av-sink.c | 1 + android/client/if-av.c | 1 + android/client/if-bt.c | 1 + android/client/if-gatt.c | 2 +- android/client/if-hf-client.c | 1 + android/client/if-hf.c | 1 + android/client/if-hh.c | 1 + android/client/if-hl.c | 1 + android/client/if-mce.c | 1 + android/client/if-pan.c | 1 + android/client/if-rc-ctrl.c | 1 + android/client/if-rc.c | 1 + android/client/if-sco.c | 1 + android/client/if-sock.c | 1 + android/client/tabcompletion.c | 1 + android/gatt.c | 6 +++--- android/hal-audio-aptx.c | 1 + android/hal-audio-sbc.c | 1 + android/hal-audio.c | 1 + android/hal-avrcp-ctrl.c | 1 + android/hal-avrcp.c | 1 + android/hal-bluetooth.c | 1 + android/hal-gatt.c | 1 + android/hal-handsfree.c | 1 + android/hal-pan.c | 1 + android/hal-sco.c | 1 + android/hal-socket.c | 1 + android/hal-utils.c | 1 + android/hardware/hardware.c | 1 + android/health.c | 1 + android/ipc-tester.c | 1 + android/main.c | 1 + android/pan.c | 1 + android/system-emulator.c | 1 + android/tester-a2dp.c | 1 + android/tester-avrcp.c | 1 + android/tester-bluetooth.c | 2 ++ android/tester-gatt.c | 1 + android/tester-hdp.c | 1 + android/tester-hidhost.c | 1 + android/tester-main.c | 2 ++ android/tester-map-client.c | 1 + android/tester-pan.c | 1 + android/tester-socket.c | 1 + 49 files changed, 54 insertions(+), 6 deletions(-) (limited to 'android') diff --git a/android/avdtptest.c b/android/avdtptest.c index ce344437d..98b9ef0fa 100644 --- a/android/avdtptest.c +++ b/android/avdtptest.c @@ -25,6 +25,7 @@ #include #endif +#define _GNU_SOURCE #include #include #include diff --git a/android/avrcp-lib.c b/android/avrcp-lib.c index 4edfd0e9b..2c874952c 100644 --- a/android/avrcp-lib.c +++ b/android/avrcp-lib.c @@ -25,6 +25,7 @@ #include #endif +#define _GNU_SOURCE #include #include #include diff --git a/android/bluetooth.c b/android/bluetooth.c index 9c7ee7440..fb027bf34 100644 --- a/android/bluetooth.c +++ b/android/bluetooth.c @@ -4093,7 +4093,7 @@ bool bt_le_add_advertising(struct adv_instance *adv, DBG("lens: adv=%u sr=%u total=%zu", cp->adv_data_len, cp->scan_rsp_len, len); - cb_data = new0(typeof(*cb_data), 1); + cb_data = new0(__typeof__(*cb_data), 1); cb_data->cb = cb; cb_data->user_data = user_data; @@ -4134,7 +4134,7 @@ bool bt_le_remove_advertising(struct adv_instance *adv, struct addrm_adv_user_data *cb_data; bool ok; - cb_data = new0(typeof(*cb_data), 1); + cb_data = new0(__typeof__(*cb_data), 1); cb_data->cb = cb; cb_data->user_data = user_data; diff --git a/android/client/haltest.c b/android/client/haltest.c index 92cd8114a..e9a92a29a 100644 --- a/android/client/haltest.c +++ b/android/client/haltest.c @@ -19,6 +19,7 @@ #include #endif +#define _GNU_SOURCE #include #include #include diff --git a/android/client/if-audio.c b/android/client/if-audio.c index 65e2f2ff9..630b5e685 100644 --- a/android/client/if-audio.c +++ b/android/client/if-audio.c @@ -15,6 +15,7 @@ * */ +#define _GNU_SOURCE #include #include #include diff --git a/android/client/if-av-sink.c b/android/client/if-av-sink.c index 3087dcfb1..a6c867985 100644 --- a/android/client/if-av-sink.c +++ b/android/client/if-av-sink.c @@ -15,6 +15,7 @@ * */ +#define _GNU_SOURCE #include "if-main.h" #include "../hal-utils.h" diff --git a/android/client/if-av.c b/android/client/if-av.c index 85c641b00..798a47aff 100644 --- a/android/client/if-av.c +++ b/android/client/if-av.c @@ -15,6 +15,7 @@ * */ +#define _GNU_SOURCE #include "if-main.h" #include "../hal-utils.h" diff --git a/android/client/if-bt.c b/android/client/if-bt.c index c9acf6c83..75403ec4a 100644 --- a/android/client/if-bt.c +++ b/android/client/if-bt.c @@ -15,6 +15,7 @@ * */ +#define _GNU_SOURCE #include #include diff --git a/android/client/if-gatt.c b/android/client/if-gatt.c index ed14f92c4..fbd938166 100644 --- a/android/client/if-gatt.c +++ b/android/client/if-gatt.c @@ -15,8 +15,8 @@ * */ +#define _GNU_SOURCE #include - #include #include diff --git a/android/client/if-hf-client.c b/android/client/if-hf-client.c index 3f6f7c288..f701a814c 100644 --- a/android/client/if-hf-client.c +++ b/android/client/if-hf-client.c @@ -15,6 +15,7 @@ * */ +#define _GNU_SOURCE #include "if-main.h" #include "../hal-utils.h" diff --git a/android/client/if-hf.c b/android/client/if-hf.c index 6b798f86d..68df00b46 100644 --- a/android/client/if-hf.c +++ b/android/client/if-hf.c @@ -15,6 +15,7 @@ * */ +#define _GNU_SOURCE #include "if-main.h" #include "../hal-utils.h" diff --git a/android/client/if-hh.c b/android/client/if-hh.c index 25519e5d7..04a54dea2 100644 --- a/android/client/if-hh.c +++ b/android/client/if-hh.c @@ -15,6 +15,7 @@ * */ +#define _GNU_SOURCE #include #include #include diff --git a/android/client/if-hl.c b/android/client/if-hl.c index bd0567111..1498fd5b0 100644 --- a/android/client/if-hl.c +++ b/android/client/if-hl.c @@ -15,6 +15,7 @@ * */ +#define _GNU_SOURCE #include #include #include diff --git a/android/client/if-mce.c b/android/client/if-mce.c index 5f101e001..ef1968920 100644 --- a/android/client/if-mce.c +++ b/android/client/if-mce.c @@ -15,6 +15,7 @@ * */ +#define _GNU_SOURCE #include "if-main.h" #include "../hal-utils.h" diff --git a/android/client/if-pan.c b/android/client/if-pan.c index b0c4b8410..b3098ba45 100644 --- a/android/client/if-pan.c +++ b/android/client/if-pan.c @@ -15,6 +15,7 @@ * */ +#define _GNU_SOURCE #include "if-main.h" #include "../hal-utils.h" diff --git a/android/client/if-rc-ctrl.c b/android/client/if-rc-ctrl.c index 398076410..39e4b9051 100644 --- a/android/client/if-rc-ctrl.c +++ b/android/client/if-rc-ctrl.c @@ -15,6 +15,7 @@ * */ +#define _GNU_SOURCE #include #include #include diff --git a/android/client/if-rc.c b/android/client/if-rc.c index ed65600fe..6a5bffb6c 100644 --- a/android/client/if-rc.c +++ b/android/client/if-rc.c @@ -15,6 +15,7 @@ * */ +#define _GNU_SOURCE #include #include #include diff --git a/android/client/if-sco.c b/android/client/if-sco.c index 5a68ed57a..6b570d229 100644 --- a/android/client/if-sco.c +++ b/android/client/if-sco.c @@ -15,6 +15,7 @@ * */ +#define _GNU_SOURCE #include #include #include diff --git a/android/client/if-sock.c b/android/client/if-sock.c index ee2c1e87c..a188cf680 100644 --- a/android/client/if-sock.c +++ b/android/client/if-sock.c @@ -15,6 +15,7 @@ * */ +#define _GNU_SOURCE #include #include #include diff --git a/android/client/tabcompletion.c b/android/client/tabcompletion.c index bcca5fa48..dc6faa887 100644 --- a/android/client/tabcompletion.c +++ b/android/client/tabcompletion.c @@ -15,6 +15,7 @@ * */ +#define _GNU_SOURCE #include #include #include diff --git a/android/gatt.c b/android/gatt.c index 6b36985d3..9351a667d 100644 --- a/android/gatt.c +++ b/android/gatt.c @@ -5636,7 +5636,7 @@ static struct adv_instance *find_adv_instance(uint32_t client_if) if (!inst) return NULL; - adv = new0(typeof(*adv), 1); + adv = new0(__typeof__(*adv), 1); adv->instance = inst; app->adv = adv; @@ -5834,7 +5834,7 @@ static void handle_client_setup_multi_adv_inst(const void *buf, uint16_t len) adv->ad = adv_data; } - cb_data = new0(typeof(*cb_data), 1); + cb_data = new0(__typeof__(*cb_data), 1); cb_data->client_if = cmd->client_if; cb_data->adv = adv; @@ -5894,7 +5894,7 @@ static void handle_client_disable_multi_adv_inst(const void *buf, uint16_t len) if (!adv) goto out; - cb_data = new0(typeof(*cb_data), 1); + cb_data = new0(__typeof__(*cb_data), 1); cb_data->client_if = cmd->client_if; cb_data->adv = adv; diff --git a/android/hal-audio-aptx.c b/android/hal-audio-aptx.c index a8000759b..bff2331a9 100644 --- a/android/hal-audio-aptx.c +++ b/android/hal-audio-aptx.c @@ -15,6 +15,7 @@ * */ +#define _GNU_SOURCE #include #include #include diff --git a/android/hal-audio-sbc.c b/android/hal-audio-sbc.c index 7ad3a6a51..9da9575f5 100644 --- a/android/hal-audio-sbc.c +++ b/android/hal-audio-sbc.c @@ -15,6 +15,7 @@ * */ +#define _GNU_SOURCE #include #include #include diff --git a/android/hal-audio.c b/android/hal-audio.c index 207101fa8..2b25b6e08 100644 --- a/android/hal-audio.c +++ b/android/hal-audio.c @@ -15,6 +15,7 @@ * */ +#define _GNU_SOURCE #include #include #include diff --git a/android/hal-avrcp-ctrl.c b/android/hal-avrcp-ctrl.c index 46b77fd8f..a6137a5ad 100644 --- a/android/hal-avrcp-ctrl.c +++ b/android/hal-avrcp-ctrl.c @@ -15,6 +15,7 @@ * */ +#define _GNU_SOURCE #include #include #include diff --git a/android/hal-avrcp.c b/android/hal-avrcp.c index f935eda51..b2127ade9 100644 --- a/android/hal-avrcp.c +++ b/android/hal-avrcp.c @@ -15,6 +15,7 @@ * */ +#define _GNU_SOURCE #include #include #include diff --git a/android/hal-bluetooth.c b/android/hal-bluetooth.c index 66f4a3774..f22801b04 100644 --- a/android/hal-bluetooth.c +++ b/android/hal-bluetooth.c @@ -15,6 +15,7 @@ * */ +#define _GNU_SOURCE #include #include #include diff --git a/android/hal-gatt.c b/android/hal-gatt.c index f7217c789..2e706cf24 100644 --- a/android/hal-gatt.c +++ b/android/hal-gatt.c @@ -15,6 +15,7 @@ * */ +#define _GNU_SOURCE #include #include #include diff --git a/android/hal-handsfree.c b/android/hal-handsfree.c index 3847901a9..af21b675f 100644 --- a/android/hal-handsfree.c +++ b/android/hal-handsfree.c @@ -15,6 +15,7 @@ * */ +#define _GNU_SOURCE #include #include #include diff --git a/android/hal-pan.c b/android/hal-pan.c index 61d44a930..5e1afc80a 100644 --- a/android/hal-pan.c +++ b/android/hal-pan.c @@ -15,6 +15,7 @@ * */ +#define _GNU_SOURCE #include #include #include diff --git a/android/hal-sco.c b/android/hal-sco.c index 2c95866e7..f4b4d3160 100644 --- a/android/hal-sco.c +++ b/android/hal-sco.c @@ -15,6 +15,7 @@ * */ +#define _GNU_SOURCE #include #include #include diff --git a/android/hal-socket.c b/android/hal-socket.c index cfd50d154..b971074f9 100644 --- a/android/hal-socket.c +++ b/android/hal-socket.c @@ -15,6 +15,7 @@ * */ +#define _GNU_SOURCE #include #include #include diff --git a/android/hal-utils.c b/android/hal-utils.c index e45f6e4a6..74f292756 100644 --- a/android/hal-utils.c +++ b/android/hal-utils.c @@ -15,6 +15,7 @@ * */ +#define _GNU_SOURCE #include #include #include diff --git a/android/hardware/hardware.c b/android/hardware/hardware.c index 3a45fe1f1..42d03ba52 100644 --- a/android/hardware/hardware.c +++ b/android/hardware/hardware.c @@ -14,6 +14,7 @@ * limitations under the License. */ +#define _GNU_SOURCE #include #include diff --git a/android/health.c b/android/health.c index eb02a64ae..90253ac00 100644 --- a/android/health.c +++ b/android/health.c @@ -26,6 +26,7 @@ #include #endif +#define _GNU_SOURCE #include #include #include diff --git a/android/ipc-tester.c b/android/ipc-tester.c index 3b7f13a0e..c1d0e8ad6 100644 --- a/android/ipc-tester.c +++ b/android/ipc-tester.c @@ -25,6 +25,7 @@ #include #endif +#define _GNU_SOURCE #include #include #include diff --git a/android/main.c b/android/main.c index 03c8760b9..b505c2f77 100644 --- a/android/main.c +++ b/android/main.c @@ -25,6 +25,7 @@ #include #endif +#define _GNU_SOURCE #include #include #include diff --git a/android/pan.c b/android/pan.c index c40a6d3e7..1e6d87641 100644 --- a/android/pan.c +++ b/android/pan.c @@ -25,6 +25,7 @@ #include #endif +#define _GNU_SOURCE #include #include #include diff --git a/android/system-emulator.c b/android/system-emulator.c index 8bcf660e2..edf3e89e0 100644 --- a/android/system-emulator.c +++ b/android/system-emulator.c @@ -25,6 +25,7 @@ #include #endif +#define _GNU_SOURCE #include #include #include diff --git a/android/tester-a2dp.c b/android/tester-a2dp.c index 8397eeff5..554a3941d 100644 --- a/android/tester-a2dp.c +++ b/android/tester-a2dp.c @@ -15,6 +15,7 @@ * */ +#define _GNU_SOURCE #include #include "emulator/bthost.h" diff --git a/android/tester-avrcp.c b/android/tester-avrcp.c index 737602e5b..e0e7b7f6a 100644 --- a/android/tester-avrcp.c +++ b/android/tester-avrcp.c @@ -15,6 +15,7 @@ * */ +#define _GNU_SOURCE #include #include "emulator/bthost.h" diff --git a/android/tester-bluetooth.c b/android/tester-bluetooth.c index b42a81db0..6db337a94 100644 --- a/android/tester-bluetooth.c +++ b/android/tester-bluetooth.c @@ -14,6 +14,8 @@ * limitations under the License. * */ + +#define _GNU_SOURCE #include #include "emulator/bthost.h" diff --git a/android/tester-gatt.c b/android/tester-gatt.c index 6400a3f3e..c10609732 100644 --- a/android/tester-gatt.c +++ b/android/tester-gatt.c @@ -15,6 +15,7 @@ * */ +#define _GNU_SOURCE #include #include "emulator/bthost.h" diff --git a/android/tester-hdp.c b/android/tester-hdp.c index e8498205d..b4d14a339 100644 --- a/android/tester-hdp.c +++ b/android/tester-hdp.c @@ -15,6 +15,7 @@ * */ +#define _GNU_SOURCE #include #include diff --git a/android/tester-hidhost.c b/android/tester-hidhost.c index 221b122e0..73092cda8 100644 --- a/android/tester-hidhost.c +++ b/android/tester-hidhost.c @@ -15,6 +15,7 @@ * */ +#define _GNU_SOURCE #include #include "emulator/bthost.h" diff --git a/android/tester-main.c b/android/tester-main.c index 8d9add93c..3c5af299f 100644 --- a/android/tester-main.c +++ b/android/tester-main.c @@ -14,6 +14,8 @@ * limitations under the License. * */ + +#define _GNU_SOURCE #include #include #include diff --git a/android/tester-map-client.c b/android/tester-map-client.c index 695c7971f..ff3f272fc 100644 --- a/android/tester-map-client.c +++ b/android/tester-map-client.c @@ -15,6 +15,7 @@ * */ +#define _GNU_SOURCE #include #include "emulator/bthost.h" diff --git a/android/tester-pan.c b/android/tester-pan.c index 9da2488ab..74ad107a8 100644 --- a/android/tester-pan.c +++ b/android/tester-pan.c @@ -15,6 +15,7 @@ * */ +#define _GNU_SOURCE #include #include "emulator/bthost.h" diff --git a/android/tester-socket.c b/android/tester-socket.c index 2264a1f12..ac77e5aeb 100644 --- a/android/tester-socket.c +++ b/android/tester-socket.c @@ -15,6 +15,7 @@ * */ +#define _GNU_SOURCE #include #include #include -- cgit v1.2.1