projects/aports·blob master · refs

26 lines · 773 B

1diff --git a/src/getopt.c b/src/getopt.c
2index 4744e43..19776f3 100644
3--- a/src/getopt.c
4+++ b/src/getopt.c
5@@ -208,7 +208,7 @@ static char *posixly_correct;
6 whose names are inconsistent. */
7
8 #ifndef getenv
9-extern char *getenv ();
10+extern char *getenv (const char *);
11 #endif
12
13 static char *
14diff --git a/src/getopt.h b/src/getopt.h
15index b0147e9..a54c67c 100644
16--- a/src/getopt.h
17+++ b/src/getopt.h
18@@ -127,7 +127,7 @@ struct option
19 `getopt'. */
20
21 #if defined __STDC__ && __STDC__
22-# ifdef __GNU_LIBRARY__
23+# if defined __GNU_LIBRARY__ || !defined __GLIBC__
24 /* Many other libraries have conflicting prototypes for getopt, with
25 differences in the consts, in stdlib.h. To avoid compilation
26 errors, only prototype getopt for the GNU C library. */