commit:     cc08bbd83727a0f702610a30e2e2c782b2fe3687
Author:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 12 14:00:29 2020 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Sat Dec 12 14:03:26 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc08bbd8

dev-util/dwdiff: fix booleans redefinition.

Courtesy of Soap.

Closes: https://bugs.gentoo.org/759382
Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>

 dev-util/dwdiff/dwdiff-2.1.2.ebuild |  2 +-
 dev-util/dwdiff/files/C99-fix.patch | 15 +++++++++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/dev-util/dwdiff/dwdiff-2.1.2.ebuild 
b/dev-util/dwdiff/dwdiff-2.1.2.ebuild
index 01a0d81ab2a..5c70c554fff 100644
--- a/dev-util/dwdiff/dwdiff-2.1.2.ebuild
+++ b/dev-util/dwdiff/dwdiff-2.1.2.ebuild
@@ -25,7 +25,7 @@ DEPEND="
        nls? ( sys-devel/gettext )"
 
 PATCHES=(
-
+       "${FILESDIR}/C99-fix.patch"
 )
 
 src_prepare() {

diff --git a/dev-util/dwdiff/files/C99-fix.patch 
b/dev-util/dwdiff/files/C99-fix.patch
new file mode 100644
index 00000000000..9d6d9ae2bca
--- /dev/null
+++ b/dev-util/dwdiff/files/C99-fix.patch
@@ -0,0 +1,15 @@
+--- a/src/definitions.h
++++ b/src/definitions.h
+@@ -43,11 +43,11 @@
+ 
+ /*==== Misc definitions ====*/
+ /* Define a bool type if not already defined (C++ and C99 do)*/
+-#if !(defined(__cplusplus) || (defined(__STDC_VERSION__) && __STDC_VERSION__ 
>= 19990601L))
++#if !(defined(__cplusplus) || (defined(__STDC_VERSION__) && __STDC_VERSION__ 
>= 199901L))
+ /*@-incondefs@*/
+ typedef enum {false, true} bool;
+ /*@+incondefs@*/
+-#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 19990601L
++#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+ #include <stdbool.h>
+ #endif

Reply via email to