From 8605d2ae8f235926784ec7a557382eb23574f342 Mon Sep 17 00:00:00 2001 From: Ethan Sommer Date: Wed, 3 Jun 2020 15:31:28 -0400 Subject: tinywavinfo: replace obsolete memalign with posix_memalign --- utils/tinywavinfo.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'utils') diff --git a/utils/tinywavinfo.c b/utils/tinywavinfo.c index 99ee5da..c316060 100644 --- a/utils/tinywavinfo.c +++ b/utils/tinywavinfo.c @@ -32,7 +32,6 @@ #include #include #include -#include #define ID_RIFF 0x46464952 #define ID_WAVE 0x45564157 @@ -155,9 +154,8 @@ void analyse_sample(FILE *file, unsigned int channels, unsigned int bits, normalization_factor = (float)pow(2.0, (bits-1)); size = channels * byte_align * frame_size; - buffer = memalign(byte_align, size); - if (!buffer) { + if (posix_memalign(&buffer, byte_align, size)) { fprintf(stderr, "Unable to allocate %d bytes\n", size); free(buffer); return; -- cgit v1.2.3