summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2018-12-06 21:28:18 +0100
committerMarcel Holtmann <marcel@holtmann.org>2018-12-06 21:28:18 +0100
commit261948090e9073514ac4b5f64c8715cf0a71eafa (patch)
tree337274f0c0ce990d541b3e15358caadd3b111ddc /android
parenta7cfbaf711fb9c7c462547502ce91d2fa16ac3a4 (diff)
downloadbluez-261948090e9073514ac4b5f64c8715cf0a71eafa.tar.gz
build: Move declaration of _GNU_SOURCE back into individual source files
Diffstat (limited to 'android')
-rw-r--r--android/avdtptest.c1
-rw-r--r--android/avrcp-lib.c1
-rw-r--r--android/bluetooth.c4
-rw-r--r--android/client/haltest.c1
-rw-r--r--android/client/if-audio.c1
-rw-r--r--android/client/if-av-sink.c1
-rw-r--r--android/client/if-av.c1
-rw-r--r--android/client/if-bt.c1
-rw-r--r--android/client/if-gatt.c2
-rw-r--r--android/client/if-hf-client.c1
-rw-r--r--android/client/if-hf.c1
-rw-r--r--android/client/if-hh.c1
-rw-r--r--android/client/if-hl.c1
-rw-r--r--android/client/if-mce.c1
-rw-r--r--android/client/if-pan.c1
-rw-r--r--android/client/if-rc-ctrl.c1
-rw-r--r--android/client/if-rc.c1
-rw-r--r--android/client/if-sco.c1
-rw-r--r--android/client/if-sock.c1
-rw-r--r--android/client/tabcompletion.c1
-rw-r--r--android/gatt.c6
-rw-r--r--android/hal-audio-aptx.c1
-rw-r--r--android/hal-audio-sbc.c1
-rw-r--r--android/hal-audio.c1
-rw-r--r--android/hal-avrcp-ctrl.c1
-rw-r--r--android/hal-avrcp.c1
-rw-r--r--android/hal-bluetooth.c1
-rw-r--r--android/hal-gatt.c1
-rw-r--r--android/hal-handsfree.c1
-rw-r--r--android/hal-pan.c1
-rw-r--r--android/hal-sco.c1
-rw-r--r--android/hal-socket.c1
-rw-r--r--android/hal-utils.c1
-rw-r--r--android/hardware/hardware.c1
-rw-r--r--android/health.c1
-rw-r--r--android/ipc-tester.c1
-rw-r--r--android/main.c1
-rw-r--r--android/pan.c1
-rw-r--r--android/system-emulator.c1
-rw-r--r--android/tester-a2dp.c1
-rw-r--r--android/tester-avrcp.c1
-rw-r--r--android/tester-bluetooth.c2
-rw-r--r--android/tester-gatt.c1
-rw-r--r--android/tester-hdp.c1
-rw-r--r--android/tester-hidhost.c1
-rw-r--r--android/tester-main.c2
-rw-r--r--android/tester-map-client.c1
-rw-r--r--android/tester-pan.c1
-rw-r--r--android/tester-socket.c1
49 files changed, 54 insertions, 6 deletions
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 <config.h>
#endif
+#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <getopt.h>
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 <config.h>
#endif
+#define _GNU_SOURCE
#include <stdbool.h>
#include <glib.h>
#include <errno.h>
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 <config.h>
#endif
+#define _GNU_SOURCE
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
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 <pthread.h>
#include <unistd.h>
#include <math.h>
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 <string.h>
#include <inttypes.h>
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 <stdbool.h>
-
#include <string.h>
#include <hardware/bluetooth.h>
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 <stdio.h>
#include <ctype.h>
#include <string.h>
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 <stdio.h>
#include <ctype.h>
#include <unistd.h>
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 <stdio.h>
#include <ctype.h>
#include <string.h>
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 <stdio.h>
#include <ctype.h>
#include <string.h>
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 <pthread.h>
#include <unistd.h>
#include <math.h>
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 <stdio.h>
#include <ctype.h>
#include <unistd.h>
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 <stdio.h>
#include <ctype.h>
#include <string.h>
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 <stdint.h>
#include <stdbool.h>
#include <string.h>
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 <stdbool.h>
#include <string.h>
#include <malloc.h>
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 <errno.h>
#include <pthread.h>
#include <poll.h>
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 <stdbool.h>
#include <stddef.h>
#include <string.h>
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 <stdbool.h>
#include <stddef.h>
#include <string.h>
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 <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
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 <stdbool.h>
#include <string.h>
#include <stdlib.h>
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 <stdbool.h>
#include <stddef.h>
#include <string.h>
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 <stdbool.h>
#include <stddef.h>
#include <string.h>
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 <errno.h>
#include <pthread.h>
#include <poll.h>
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 <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
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 <stdio.h>
#include <string.h>
#include <stdint.h>
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 <hardware/hardware.h>
#include <dlfcn.h>
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 <config.h>
#endif
+#define _GNU_SOURCE
#include <stdint.h>
#include <stdbool.h>
#include <errno.h>
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 <config.h>
#endif
+#define _GNU_SOURCE
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
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 <config.h>
#endif
+#define _GNU_SOURCE
#include <stdbool.h>
#include <signal.h>
#include <stdint.h>
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 <config.h>
#endif
+#define _GNU_SOURCE
#include <stdint.h>
#include <stdbool.h>
#include <errno.h>
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 <config.h>
#endif
+#define _GNU_SOURCE
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
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 <stdbool.h>
#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 <stdbool.h>
#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 <stdbool.h>
#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 <stdbool.h>
#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 <stdlib.h>
#include <stdbool.h>
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 <stdbool.h>
#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 <stdbool.h>
#include <unistd.h>
#include <libgen.h>
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 <stdbool.h>
#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 <stdbool.h>
#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 <fcntl.h>
#include <unistd.h>
#include <stdbool.h>