diff options
author | Khem Raj <raj.khem@gmail.com> | 2021-09-11 00:40:49 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2021-09-11 00:40:49 -0700 |
commit | 864d08d748850805ea1eb8abee4b7fd64d32825d (patch) | |
tree | c8444c48d8257bd470415b907775ea24b52735a4 /recipes-multimedia | |
parent | 0e0bd2a3583520a79695fce3114ebe492bf50768 (diff) | |
download | meta-freescale-864d08d748850805ea1eb8abee4b7fd64d32825d.tar.gz |
tinycompress: Fix build with musl
Fixes a build error discovered by musl, we need to include sys/types.h
for u_charr and its friends.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'recipes-multimedia')
-rwxr-xr-x | recipes-multimedia/tinycompress/tinycompress/0002-cplay-Support-wave-file.patch | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/recipes-multimedia/tinycompress/tinycompress/0002-cplay-Support-wave-file.patch b/recipes-multimedia/tinycompress/tinycompress/0002-cplay-Support-wave-file.patch index 9189bc0e..79544711 100755 --- a/recipes-multimedia/tinycompress/tinycompress/0002-cplay-Support-wave-file.patch +++ b/recipes-multimedia/tinycompress/tinycompress/0002-cplay-Support-wave-file.patch | |||
@@ -15,15 +15,14 @@ Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> | |||
15 | 2 files changed, 158 insertions(+) | 15 | 2 files changed, 158 insertions(+) |
16 | create mode 100644 include/tinycompress/wave_formats.h | 16 | create mode 100644 include/tinycompress/wave_formats.h |
17 | 17 | ||
18 | diff --git a/include/tinycompress/wave_formats.h b/include/tinycompress/wave_formats.h | ||
19 | new file mode 100644 | ||
20 | index 000000000000..4e2e009206cf | ||
21 | --- /dev/null | 18 | --- /dev/null |
22 | +++ b/include/tinycompress/wave_formats.h | 19 | +++ b/include/tinycompress/wave_formats.h |
23 | @@ -0,0 +1,51 @@ | 20 | @@ -0,0 +1,53 @@ |
24 | +#ifndef WAVE_FORMATS_H | 21 | +#ifndef WAVE_FORMATS_H |
25 | +#define WAVE_FORMATS_H 1 | 22 | +#define WAVE_FORMATS_H 1 |
26 | + | 23 | + |
24 | +#include <sys/types.h> | ||
25 | + | ||
27 | +#define COMPOSE_ID(a,b,c,d) ((a) | ((b)<<8) | ((c)<<16) | ((d)<<24)) | 26 | +#define COMPOSE_ID(a,b,c,d) ((a) | ((b)<<8) | ((c)<<16) | ((d)<<24)) |
28 | + | 27 | + |
29 | +#define WAV_RIFF COMPOSE_ID('R','I','F','F') | 28 | +#define WAV_RIFF COMPOSE_ID('R','I','F','F') |
@@ -72,8 +71,6 @@ index 000000000000..4e2e009206cf | |||
72 | + | 71 | + |
73 | + | 72 | + |
74 | +#endif /* FORMATS */ | 73 | +#endif /* FORMATS */ |
75 | diff --git a/src/utils/cplay.c b/src/utils/cplay.c | ||
76 | index 5b749419e731..8882f4d9746d 100644 | ||
77 | --- a/src/utils/cplay.c | 74 | --- a/src/utils/cplay.c |
78 | +++ b/src/utils/cplay.c | 75 | +++ b/src/utils/cplay.c |
79 | @@ -1,4 +1,6 @@ | 76 | @@ -1,4 +1,6 @@ |
@@ -92,7 +89,7 @@ index 5b749419e731..8882f4d9746d 100644 | |||
92 | 89 | ||
93 | static int verbose; | 90 | static int verbose; |
94 | static const unsigned int DEFAULT_CODEC_ID = SND_AUDIOCODEC_PCM; | 91 | static const unsigned int DEFAULT_CODEC_ID = SND_AUDIOCODEC_PCM; |
95 | @@ -166,6 +170,77 @@ static int parse_mp3_header(struct mp3_header *header, unsigned int *num_channel | 92 | @@ -166,6 +170,77 @@ static int parse_mp3_header(struct mp3_h |
96 | return 0; | 93 | return 0; |
97 | } | 94 | } |
98 | 95 | ||
@@ -170,7 +167,7 @@ index 5b749419e731..8882f4d9746d 100644 | |||
170 | static int print_time(struct compress *compress) | 167 | static int print_time(struct compress *compress) |
171 | { | 168 | { |
172 | unsigned int avail; | 169 | unsigned int avail; |
173 | @@ -385,6 +460,35 @@ void get_codec_iec(FILE *file, struct compr_config *config, | 170 | @@ -385,6 +460,35 @@ void get_codec_iec(FILE *file, struct co |
174 | codec->format = 0; | 171 | codec->format = 0; |
175 | } | 172 | } |
176 | 173 | ||
@@ -206,7 +203,7 @@ index 5b749419e731..8882f4d9746d 100644 | |||
206 | void play_samples(char *name, unsigned int card, unsigned int device, | 203 | void play_samples(char *name, unsigned int card, unsigned int device, |
207 | unsigned long buffer_size, unsigned int frag, | 204 | unsigned long buffer_size, unsigned int frag, |
208 | unsigned long codec_id) | 205 | unsigned long codec_id) |
209 | @@ -411,6 +515,9 @@ void play_samples(char *name, unsigned int card, unsigned int device, | 206 | @@ -411,6 +515,9 @@ void play_samples(char *name, unsigned i |
210 | case SND_AUDIOCODEC_IEC61937: | 207 | case SND_AUDIOCODEC_IEC61937: |
211 | get_codec_iec(file, &config, &codec); | 208 | get_codec_iec(file, &config, &codec); |
212 | break; | 209 | break; |
@@ -216,6 +213,3 @@ index 5b749419e731..8882f4d9746d 100644 | |||
216 | default: | 213 | default: |
217 | fprintf(stderr, "codec ID %ld is not supported\n", codec_id); | 214 | fprintf(stderr, "codec ID %ld is not supported\n", codec_id); |
218 | exit(EXIT_FAILURE); | 215 | exit(EXIT_FAILURE); |
219 | -- | ||
220 | 2.27.0 | ||
221 | |||