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>
This commit is contained in:
Khem Raj
2025-03-19 01:15:38 -07:00
committed by Richard Purdie
parent 93bc67e4fe
commit 05a300261e
2 changed files with 66 additions and 0 deletions

View File

@@ -0,0 +1,65 @@
From 0ba5ab2fb7f29a01dbe570c324011e8cffc89d82 Mon Sep 17 00:00:00 2001
From: Fabian Greffrath <fabian@greffrath.com>
Date: Tue, 17 Dec 2024 10:38:47 +0100
Subject: [PATCH] Include <stdbool.h> instead of redefining `bool`, `true` and
`false` keywords
Fixes #1049
Upstream-Status: Submitted [https://github.com/libsndfile/libsndfile/pull/1055]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/ALAC/alac_decoder.c | 6 +-----
src/ALAC/alac_encoder.c | 7 +------
2 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/src/ALAC/alac_decoder.c b/src/ALAC/alac_decoder.c
index 46d3330..1b4a87c 100644
--- a/src/ALAC/alac_decoder.c
+++ b/src/ALAC/alac_decoder.c
@@ -26,6 +26,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
+#include <stdbool.h>
#include <string.h>
#include "alac_codec.h"
@@ -38,11 +39,6 @@
#include "ALACBitUtilities.h"
#include "EndianPortable.h"
-typedef enum
-{ false = 0,
- true = 1
-} bool ;
-
// constants/data
const uint32_t kMaxBitDepth = 32 ; // max allowed bit depth is 32
diff --git a/src/ALAC/alac_encoder.c b/src/ALAC/alac_encoder.c
index 599399a..f303311 100644
--- a/src/ALAC/alac_encoder.c
+++ b/src/ALAC/alac_encoder.c
@@ -30,6 +30,7 @@
// headers
#include <stdio.h>
#include <stdlib.h>
+#include <stdbool.h>
#include <string.h>
#include "sfendian.h"
@@ -44,12 +45,6 @@
#include "ALACAudioTypes.h"
#include "EndianPortable.h"
-typedef enum
-{
- false = 0,
- true = 1
-} bool ;
-
static void GetConfig (ALAC_ENCODER *p, ALACSpecificConfig * config) ;
static int32_t EncodeStereo (ALAC_ENCODER *p, struct BitBuffer * bitstream, const int32_t * input, uint32_t stride, uint32_t channelIndex, uint32_t numSamples) ;

View File

@@ -11,6 +11,7 @@ SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/libsndfile-${PV}.tar.xz \
file://noopus.patch \
file://cve-2022-33065.patch \
file://CVE-2024-50612.patch \
file://0001-Include-stdbool.h-instead-of-redefining-bool-true-an.patch \
"
GITHUB_BASE_URI = "https://github.com/libsndfile/libsndfile/releases/"