blob: d5aad908a7dee75caa5509d22d1dda070d00dfa7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# We don't need to declare getopt
# No conflict with musl or glibc
diff --git a/compat/getopt.h b/compat/getopt.h
index b0147e9..62de71c 100644
--- a/compat/getopt.h
+++ b/compat/getopt.h
@@ -127,15 +127,7 @@ struct option
`getopt'. */
#if defined __STDC__ && __STDC__
-# ifdef __GNU_LIBRARY__
-/* Many other libraries have conflicting prototypes for getopt, with
- differences in the consts, in stdlib.h. To avoid compilation
- 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 ();
-# endif /* __GNU_LIBRARY__ */
-
+// getopt already declared in glibc and musl
# ifndef __need_getopt
extern int getopt_long (int __argc, char *const *__argv, const char *__shortopts,
const struct option *__longopts, int *__longind);
|