Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 859910

Summary: media-libs/libcdaudio-0.99.12-r4 fails to compile: cdaudio.c:123:7: error: conflicting types for mounts; have int
Product: Gentoo Linux Reporter: Agostino Sarubbo <ago>
Component: Current packagesAssignee: Gentoo Sound Team <sound>
Severity: normal CC: eschwartz93
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Attachments: build.log

Description Agostino Sarubbo gentoo-dev 2022-07-22 06:43:55 UTC

Issue: media-libs/libcdaudio-0.99.12-r3 fails to compile (lto).
Discovered on: amd64 (internal ref: lto_tinderbox)

This machine uses lto with CFLAGS=-flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing
Comment 1 Agostino Sarubbo gentoo-dev 2022-07-22 06:43:57 UTC
Created attachment 792998 [details]

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2022-10-06 08:53:41 UTC
lto_tinderbox has reproduced this issue with version 0.99.12-r4 - Updating summary.
Comment 3 Eli Schwartz 2024-03-11 02:59:22 UTC
cdaudio.c:123:7: error: conflicting types for 'mounts'; have 'int'
  123 |   int mounts;
      |       ^~~~~~
cdaudio.c:119:9: note: previous declaration of 'mounts' with type 'FILE *'
  119 |   FILE *mounts;
      |         ^~~~~~
cdaudio.c:124:18: error: conflicting types for 'mnt'; have 'struct statfs *'
  124 |   struct statfs *mnt;
      |                  ^~~
cdaudio.c:120:18: note: previous declaration of 'mnt' with type 'struct mntent *'
  120 |   struct mntent *mnt;
      |                  ^~~
cdaudio.c:159:19: error: invalid use of undefined type 'struct statfs'
  159 |     if(strncmp(mnt->mnt_fsname, devname, len) == 0) {
      |                   ^~

Not an LTO issue...

(Appears to be a screwed up autoconf check in cdaudio.c.)
Comment 4 Larry the Git Cow gentoo-dev 2024-03-11 14:24:06 UTC
The bug has been closed via the following commit(s):

commit fa245858213a0663022ff039f5ee7dbd2ec8575c
Author:     Eli Schwartz <>
AuthorDate: 2024-03-11 02:48:36 +0000
Commit:     Sam James <>
CommitDate: 2024-03-11 14:22:49 +0000

    media-libs/libcdaudio: fully refresh autotools
    It uses an extremely vintage 2004 edition that includes some kind of
    horrible idea from the early days of the 21st century. Apparently, back
    then, portability meant "autotools can convert your ANSI C code to K&R
    C". This functionality has long since been removed from current
    automake, so eautoreconf doesn't actually run until we remove a few
    troublesome lines.
    Needed to e.g. pass LTO warning flags through to the linker, and well, a
    whole lot more.
    Also fixes a build issue with conflicting definitions of mount?
    Signed-off-by: Eli Schwartz <>
    Signed-off-by: Sam James <>

 media-libs/libcdaudio/libcdaudio-0.99.12-r5.ebuild | 12 ++++++++++++
 1 file changed, 12 insertions(+)