Skip to content

Commit ce9082e

Browse files
committed
XviD: fix build with C23
In C23, bool is a built-in keyword. Guard the typedef int bool; in encoder.h so it is only used with older C standards.
1 parent c6e9cd1 commit ce9082e

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

multimedia/XviD/Portfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ patchfiles configure-CFLAGS.patch \
3838
configure-dynlib.patch \
3939
configure-flat_namespace.patch \
4040
configure-SO_LINK.patch \
41-
Makefile-verbose.patch
41+
Makefile-verbose.patch \
42+
encoder-bool-c23.patch
4243

4344
use_autoreconf yes
4445

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Guard typedef for bool against C23, where bool is a built-in keyword.
2+
--- ../../src/encoder.h.orig 2014-04-29 07:05:36.000000000 -0700
3+
+++ ../../src/encoder.h 2014-04-29 07:05:36.000000000 -0700
4+
@@ -42,7 +42,9 @@
5+
* Types
6+
****************************************************************************/
7+
8+
+#if !defined(__cplusplus) && (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 202311L)
9+
typedef int bool;
10+
+#endif
11+
12+
/*****************************************************************************
13+
* Structures

0 commit comments

Comments
 (0)