diff options
author | Khem Raj <raj.khem@gmail.com> | 2025-03-19 01:15:38 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-03-19 12:09:06 +0000 |
commit | 05a300261e177e50b81bd72fa84767b766be34c8 (patch) | |
tree | d0b8d6c704c45b2f93bf43a973ad1eb2d9b2d2c7 | |
parent | 93bc67e4fe8a335618d6cd5e4abd749bbe881204 (diff) | |
download | poky-05a300261e177e50b81bd72fa84767b766be34c8.tar.gz |
libsndfile1: Include <stdbool.h> instead of redefining bool true and false
(From OE-Core rev: 198323f4381cc40d219185e86800872df5f9d789)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-multimedia/libsndfile/libsndfile1/0001-Include-stdbool.h-instead-of-redefining-bool-true-an.patch | 65 | ||||
-rw-r--r-- | meta/recipes-multimedia/libsndfile/libsndfile1_1.2.2.bb | 1 |
2 files changed, 66 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/0001-Include-stdbool.h-instead-of-redefining-bool-true-an.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/0001-Include-stdbool.h-instead-of-redefining-bool-true-an.patch new file mode 100644 index 0000000000..542a783859 --- /dev/null +++ b/meta/recipes-multimedia/libsndfile/libsndfile1/0001-Include-stdbool.h-instead-of-redefining-bool-true-an.patch | |||
@@ -0,0 +1,65 @@ | |||
1 | From 0ba5ab2fb7f29a01dbe570c324011e8cffc89d82 Mon Sep 17 00:00:00 2001 | ||
2 | From: Fabian Greffrath <fabian@greffrath.com> | ||
3 | Date: Tue, 17 Dec 2024 10:38:47 +0100 | ||
4 | Subject: [PATCH] Include <stdbool.h> instead of redefining `bool`, `true` and | ||
5 | `false` keywords | ||
6 | |||
7 | Fixes #1049 | ||
8 | |||
9 | Upstream-Status: Submitted [https://github.com/libsndfile/libsndfile/pull/1055] | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | src/ALAC/alac_decoder.c | 6 +----- | ||
14 | src/ALAC/alac_encoder.c | 7 +------ | ||
15 | 2 files changed, 2 insertions(+), 11 deletions(-) | ||
16 | |||
17 | diff --git a/src/ALAC/alac_decoder.c b/src/ALAC/alac_decoder.c | ||
18 | index 46d3330..1b4a87c 100644 | ||
19 | --- a/src/ALAC/alac_decoder.c | ||
20 | +++ b/src/ALAC/alac_decoder.c | ||
21 | @@ -26,6 +26,7 @@ | ||
22 | #include <stdio.h> | ||
23 | #include <stdlib.h> | ||
24 | #include <stddef.h> | ||
25 | +#include <stdbool.h> | ||
26 | #include <string.h> | ||
27 | |||
28 | #include "alac_codec.h" | ||
29 | @@ -38,11 +39,6 @@ | ||
30 | #include "ALACBitUtilities.h" | ||
31 | #include "EndianPortable.h" | ||
32 | |||
33 | -typedef enum | ||
34 | -{ false = 0, | ||
35 | - true = 1 | ||
36 | -} bool ; | ||
37 | - | ||
38 | // constants/data | ||
39 | const uint32_t kMaxBitDepth = 32 ; // max allowed bit depth is 32 | ||
40 | |||
41 | diff --git a/src/ALAC/alac_encoder.c b/src/ALAC/alac_encoder.c | ||
42 | index 599399a..f303311 100644 | ||
43 | --- a/src/ALAC/alac_encoder.c | ||
44 | +++ b/src/ALAC/alac_encoder.c | ||
45 | @@ -30,6 +30,7 @@ | ||
46 | // headers | ||
47 | #include <stdio.h> | ||
48 | #include <stdlib.h> | ||
49 | +#include <stdbool.h> | ||
50 | #include <string.h> | ||
51 | |||
52 | #include "sfendian.h" | ||
53 | @@ -44,12 +45,6 @@ | ||
54 | #include "ALACAudioTypes.h" | ||
55 | #include "EndianPortable.h" | ||
56 | |||
57 | -typedef enum | ||
58 | -{ | ||
59 | - false = 0, | ||
60 | - true = 1 | ||
61 | -} bool ; | ||
62 | - | ||
63 | static void GetConfig (ALAC_ENCODER *p, ALACSpecificConfig * config) ; | ||
64 | |||
65 | static int32_t EncodeStereo (ALAC_ENCODER *p, struct BitBuffer * bitstream, const int32_t * input, uint32_t stride, uint32_t channelIndex, uint32_t numSamples) ; | ||
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1_1.2.2.bb b/meta/recipes-multimedia/libsndfile/libsndfile1_1.2.2.bb index 2a1b96d5e7..63c1570621 100644 --- a/meta/recipes-multimedia/libsndfile/libsndfile1_1.2.2.bb +++ b/meta/recipes-multimedia/libsndfile/libsndfile1_1.2.2.bb | |||
@@ -11,6 +11,7 @@ SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/libsndfile-${PV}.tar.xz \ | |||
11 | file://noopus.patch \ | 11 | file://noopus.patch \ |
12 | file://cve-2022-33065.patch \ | 12 | file://cve-2022-33065.patch \ |
13 | file://CVE-2024-50612.patch \ | 13 | file://CVE-2024-50612.patch \ |
14 | file://0001-Include-stdbool.h-instead-of-redefining-bool-true-an.patch \ | ||
14 | " | 15 | " |
15 | GITHUB_BASE_URI = "https://github.com/libsndfile/libsndfile/releases/" | 16 | GITHUB_BASE_URI = "https://github.com/libsndfile/libsndfile/releases/" |
16 | 17 | ||