media-gfx/iscan: fix build due to bool mismatch

Use <stdbool.h> instead of a custom bool type when available, to avoid
build failures if other packages include <stdbool.h> later, which
redefines it to _Bool. This causes build failures due to mismatch
between declarations and definitions.

Closes: https://bugs.gentoo.org/755884
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Hector Martin <marcan@marcan.st>
Closes: https://github.com/gentoo/gentoo/pull/18938
Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
This commit is contained in:
Hector Martin
2021-01-04 17:22:12 +09:00
committed by Andreas Sturmlechner
parent 0ec9075ea4
commit b2757129ca
2 changed files with 26 additions and 1 deletions

View File

@@ -0,0 +1,24 @@
--- a/backend/defines.h 2021-01-04 08:13:48.995137756 -0000
+++ b/backend/defines.h 2021-01-04 08:16:00.524563361 -0000
@@ -31,6 +31,13 @@
#ifndef __cplusplus
+
+/* Use the C99 bool type if available
+ */
+#ifdef HAVE_STDBOOL_H
+#include <stdbool.h>
+#else
+
/*! A C++ Boolean type and corresponding keywords for our C code.
*/
typedef enum {
@@ -38,6 +45,7 @@
true
} bool;
#endif
+#endif
/* Run-time contract validation.

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2020 Gentoo Authors
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -70,6 +70,7 @@ PATCHES=(
"${FILESDIR}"/iscan-2.30.1.1-gcc6.patch
"${FILESDIR}"/iscan-2.30.3.1-fix-x86-unknown-types.patch
"${FILESDIR}"/iscan-2.30.4.2-sscanf.patch
"${FILESDIR}"/iscan-2.30.4.2-c99.patch
)
QA_PRESTRIPPED="usr/lib.*/libesmod.so.*"