1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
# https://lists.gnu.org/archive/html/bug-make/2025-03/msg00033.html
diff --git a/lib/fnmatch.c b/lib/fnmatch.c
index 01da376..cb1c856 100644
--- a/lib/fnmatch.c
+++ b/lib/fnmatch.c
@@ -121,7 +121,7 @@ USA. */
whose names are inconsistent. */
# if !defined _LIBC && !defined getenv
-extern char *getenv ();
+extern char *getenv (const char *);
# endif
# ifndef errno
diff --git a/src/getopt.c b/src/getopt.c
index 7a792de..76251cc 100644
--- a/src/getopt.c
+++ b/src/getopt.c
@@ -202,7 +202,7 @@ static char *posixly_correct;
whose names are inconsistent. */
#ifndef getenv
-extern char *getenv ();
+extern char *getenv (const char *);
#endif
static char *
diff --git a/src/getopt.h b/src/getopt.h
index df18cee..d8bb226 100644
--- a/src/getopt.h
+++ b/src/getopt.h
@@ -102,7 +102,7 @@ struct option
errors, only prototype getopt for the GNU C library. */
extern int getopt (int argc, char *const *argv, const char *shortopts);
#else /* not __GNU_LIBRARY__ */
-extern int getopt ();
+extern int getopt (int, char * const*, const char *);
#endif /* __GNU_LIBRARY__ */
extern int getopt_long (int argc, char *const *argv, const char *shortopts,
const struct option *longopts, int *longind);
|