Bug#1098206: libid3-3.8.3-dev: Including id3.h fails in C23 mode due to bool typedef
Package: libid3-3.8.3-dev
Version: 3.8.3-18
Severity: important
Tags: upstream
Forwarded: https://sourceforge.net/p/id3lib/bugs/215/
Hi,
It is not possible to include <id3.h> with a C23 compiler (which is
going to be the default mode for GCC 15) because the header tries to
typedef bool which is now a keyword.
> $ gcc -std=c23 -c -x c -include /usr/include/id3.h - -o /dev/null < /dev/null
> In file included from /usr/include/id3.h:32,
> from <command-line>:
> /usr/include/id3/globals.h:87:13: error: two or more data types in declaration specifiers
> 87 | typedef int bool;
> | ^~~~
> /usr/include/id3/globals.h:87:1: warning: useless type name in empty declaration
> 87 | typedef int bool;
> | ^~~~~~~
This old Ubuntu bug contains a patch to include <stdbool.h> when
compiling with C99 or greater which seems like the best solution to me.
https://bugs.launchpad.net/ubuntu/+source/id3lib3.8.3/+bug/912945
James
Reply to: