Skip to content

Commit 3ee7c8b

Browse files
authored
Merge pull request #55 from libcdio/gcc-tolerance
GCC 15 tolerance
2 parents 717f126 + dbde3c2 commit 3ee7c8b

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

src/getopt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
NOTE: getopt is part of the C library, so if you don't know what
33
"Keep this file name-space clean" means, talk to [email protected]
44
before changing it!
5-
Copyright (C) 1987-2014 Free Software Foundation, Inc.
5+
Copyright (C) 1987-2015 Free Software Foundation, Inc.
66
This file is part of the GNU C Library.
77
88
The GNU C Library is free software; you can redistribute it and/or
@@ -145,7 +145,7 @@ static struct _getopt_data getopt_data;
145145
whose names are inconsistent. */
146146

147147
#ifndef getenv
148-
extern char *getenv();
148+
extern char *getenv(const char *);
149149
#endif
150150

151151
#endif /* not __GNU_LIBRARY__ */

src/getopt.h

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Declarations for getopt.
2-
Copyright (C) 1989-2014 Free Software Foundation, Inc.
2+
Copyright (C) 1989-2015 Free Software Foundation, Inc.
33
This file is part of the GNU C Library.
44
55
The GNU C Library is free software; you can redistribute it and/or
@@ -141,7 +141,14 @@ struct option {
141141
arguments to the option '\0'. This behavior is specific to the GNU
142142
`getopt'. */
143143

144-
#ifdef __GNU_LIBRARY__
144+
/* Check for musl C library (<bits/alltypes.h> is musl specific). */
145+
#if !defined __GLIBC__ && __has_include(<bits/alltypes.h>)
146+
#ifndef __MUSL__
147+
#define __MUSL__ 1
148+
#endif
149+
#endif
150+
151+
#if defined __GLIBC__ || defined __MUSL__
145152
/* Many other libraries have conflicting prototypes for getopt, with
146153
differences in the consts, in stdlib.h. To avoid compilation
147154
errors, only prototype getopt for the GNU C library. */

test/data/cdda2.cue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
TITLE "Join us now we have the software"
22
CATALOG 0000010271955
33
PERFORMER "Richard Stallman"
4-
FILE "BOING.BIN" BINARY
4+
FILE "BOING2.BIN" BINARY
55
TRACK 01 AUDIO
66
FLAGS DCP
77
INDEX 01 00:00:00

0 commit comments

Comments
 (0)