diff options
4 files changed, 129 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc b/meta/recipes-connectivity/bluez5/bluez5.inc index d31f4e2295..d626872103 100644 --- a/meta/recipes-connectivity/bluez5/bluez5.inc +++ b/meta/recipes-connectivity/bluez5/bluez5.inc | |||
@@ -70,6 +70,9 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \ | |||
70 | file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \ | 70 | file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \ |
71 | file://0001-test-gatt-Fix-hung-issue.patch \ | 71 | file://0001-test-gatt-Fix-hung-issue.patch \ |
72 | file://0001-gdbus-define-MAX_INPUT-for-musl.patch \ | 72 | file://0001-gdbus-define-MAX_INPUT-for-musl.patch \ |
73 | file://0001-shared-ad-fix-std-c23-build-failure.patch \ | ||
74 | file://0002-shared-shell-fix-std-c23-build-failure.patch \ | ||
75 | file://0003-shared-gatt-helpers-fix-std-c23-build-failure.patch \ | ||
73 | " | 76 | " |
74 | S = "${WORKDIR}/bluez-${PV}" | 77 | S = "${WORKDIR}/bluez-${PV}" |
75 | 78 | ||
diff --git a/meta/recipes-connectivity/bluez5/bluez5/0001-shared-ad-fix-std-c23-build-failure.patch b/meta/recipes-connectivity/bluez5/bluez5/0001-shared-ad-fix-std-c23-build-failure.patch new file mode 100644 index 0000000000..82eaed7929 --- /dev/null +++ b/meta/recipes-connectivity/bluez5/bluez5/0001-shared-ad-fix-std-c23-build-failure.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From 5c4cbf5cb95e4fc1a53545af52b420a8008b3ffa Mon Sep 17 00:00:00 2001 | ||
2 | From: Rudi Heitbaum <rudi@heitbaum.com> | ||
3 | Date: Wed, 20 Nov 2024 13:02:56 +0000 | ||
4 | Subject: [PATCH 1/3] shared/ad: fix -std=c23 build failure | ||
5 | |||
6 | gcc-15 switched to -std=c23 by default: | ||
7 | |||
8 | https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=55e3bd376b2214e200fa76d12b67ff259b06c212 | ||
9 | |||
10 | As a result `bluez` fails the build as: | ||
11 | |||
12 | src/shared/ad.c:1090:24: error: incompatible types when returning type '_Bool' but 'const char *' was expected | ||
13 | 1090 | return false; | ||
14 | | ^~~~~ | ||
15 | |||
16 | Upstream-Status: Backport [https://web.git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?id=da5b5b0ecb1ead38676768ef78d46449d404bdc0] | ||
17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
18 | --- | ||
19 | src/shared/ad.c | 2 +- | ||
20 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
21 | |||
22 | diff --git a/src/shared/ad.c b/src/shared/ad.c | ||
23 | index d08ce7a..dac381b 100644 | ||
24 | --- a/src/shared/ad.c | ||
25 | +++ b/src/shared/ad.c | ||
26 | @@ -1087,7 +1087,7 @@ bool bt_ad_add_name(struct bt_ad *ad, const char *name) | ||
27 | const char *bt_ad_get_name(struct bt_ad *ad) | ||
28 | { | ||
29 | if (!ad) | ||
30 | - return false; | ||
31 | + return NULL; | ||
32 | |||
33 | return ad->name; | ||
34 | } | ||
diff --git a/meta/recipes-connectivity/bluez5/bluez5/0002-shared-shell-fix-std-c23-build-failure.patch b/meta/recipes-connectivity/bluez5/bluez5/0002-shared-shell-fix-std-c23-build-failure.patch new file mode 100644 index 0000000000..9ea622601b --- /dev/null +++ b/meta/recipes-connectivity/bluez5/bluez5/0002-shared-shell-fix-std-c23-build-failure.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From 408510d751e9482fe965e5dd96fbac7f9ee2ef62 Mon Sep 17 00:00:00 2001 | ||
2 | From: Rudi Heitbaum <rudi@heitbaum.com> | ||
3 | Date: Wed, 20 Nov 2024 13:03:29 +0000 | ||
4 | Subject: [PATCH 2/3] shared/shell: fix -std=c23 build failure | ||
5 | |||
6 | gcc-15 switched to -std=c23 by default: | ||
7 | |||
8 | https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=55e3bd376b2214e200fa76d12b67ff259b06c212 | ||
9 | |||
10 | As a result `bluez` fails the build as: | ||
11 | |||
12 | src/shared/shell.c:365:24: error: incompatible types when returning type '_Bool' but 'struct input *' was expected | ||
13 | 365 | return false; | ||
14 | | ^~~~~ | ||
15 | |||
16 | Upstream-Status: Backport [https://web.git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?id=4d60826865c760cc4e5718b6414746a394768110] | ||
17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
18 | --- | ||
19 | src/shared/shell.c | 2 +- | ||
20 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
21 | |||
22 | diff --git a/src/shared/shell.c b/src/shared/shell.c | ||
23 | index a8fa876..aa6c16c 100644 | ||
24 | --- a/src/shared/shell.c | ||
25 | +++ b/src/shared/shell.c | ||
26 | @@ -362,7 +362,7 @@ static struct input *input_new(int fd) | ||
27 | |||
28 | io = io_new(fd); | ||
29 | if (!io) | ||
30 | - return false; | ||
31 | + return NULL; | ||
32 | |||
33 | input = new0(struct input, 1); | ||
34 | input->io = io; | ||
diff --git a/meta/recipes-connectivity/bluez5/bluez5/0003-shared-gatt-helpers-fix-std-c23-build-failure.patch b/meta/recipes-connectivity/bluez5/bluez5/0003-shared-gatt-helpers-fix-std-c23-build-failure.patch new file mode 100644 index 0000000000..996bb048ac --- /dev/null +++ b/meta/recipes-connectivity/bluez5/bluez5/0003-shared-gatt-helpers-fix-std-c23-build-failure.patch | |||
@@ -0,0 +1,58 @@ | |||
1 | From 7c07bb10f57c80467bc3079d45dac4d3839927d0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Rudi Heitbaum <rudi@heitbaum.com> | ||
3 | Date: Wed, 20 Nov 2024 13:03:55 +0000 | ||
4 | Subject: [PATCH 3/3] shared/gatt-helpers: fix -std=c23 build failure | ||
5 | |||
6 | gcc-15 switched to -std=c23 by default: | ||
7 | |||
8 | https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=55e3bd376b2214e200fa76d12b67ff259b06c212 | ||
9 | |||
10 | As a result `bluez` fails the build as: | ||
11 | |||
12 | src/shared/gatt-helpers.c:1136:24: error: incompatible types when returning type '_Bool' but 'struct bt_gatt_request *' was expected | ||
13 | 1136 | return false; | ||
14 | | ^~~~~ | ||
15 | src/shared/gatt-helpers.c:1250:24: error: incompatible types when returning type '_Bool' but 'struct bt_gatt_request *' was expected | ||
16 | 1250 | return false; | ||
17 | | ^~~~~ | ||
18 | src/shared/gatt-helpers.c:1478:24: error: incompatible types when returning type '_Bool' but 'struct bt_gatt_request *' was expected | ||
19 | 1478 | return false; | ||
20 | | ^~~~~ | ||
21 | |||
22 | Upstream-Status: Backport [https://web.git.kernel.org/pub/scm/bluetooth/bluez.git/commit/?id=6f3111eb680df9c13502aacd65554846a9e13a3f] | ||
23 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
24 | --- | ||
25 | src/shared/gatt-helpers.c | 6 +++--- | ||
26 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
27 | |||
28 | diff --git a/src/shared/gatt-helpers.c b/src/shared/gatt-helpers.c | ||
29 | index 50fcb26..f1fa630 100644 | ||
30 | --- a/src/shared/gatt-helpers.c | ||
31 | +++ b/src/shared/gatt-helpers.c | ||
32 | @@ -1133,7 +1133,7 @@ struct bt_gatt_request *bt_gatt_discover_included_services(struct bt_att *att, | ||
33 | uint8_t pdu[6]; | ||
34 | |||
35 | if (!att) | ||
36 | - return false; | ||
37 | + return NULL; | ||
38 | |||
39 | op = new0(struct bt_gatt_request, 1); | ||
40 | op->att = att; | ||
41 | @@ -1247,7 +1247,7 @@ struct bt_gatt_request *bt_gatt_discover_characteristics(struct bt_att *att, | ||
42 | uint8_t pdu[6]; | ||
43 | |||
44 | if (!att) | ||
45 | - return false; | ||
46 | + return NULL; | ||
47 | |||
48 | op = new0(struct bt_gatt_request, 1); | ||
49 | op->att = att; | ||
50 | @@ -1475,7 +1475,7 @@ struct bt_gatt_request *bt_gatt_discover_descriptors(struct bt_att *att, | ||
51 | uint8_t pdu[4]; | ||
52 | |||
53 | if (!att) | ||
54 | - return false; | ||
55 | + return NULL; | ||
56 | |||
57 | op = new0(struct bt_gatt_request, 1); | ||
58 | op->att = att; | ||