mirror of
https://github.com/immortalwrt/immortalwrt.git
synced 2025-08-11 06:11:53 +08:00
tools/bc: let getopt() prototype be defined normally
Add a patch in order to remove an obsolete workaround that is currently causing issues on some macOS systems. Add patch: - 000-getopt-prototype.patch Tested-by: Georgi Valkov <gvalkov@gmail.com> # macOS Signed-off-by: Michael Pratt <mcpratt@pm.me> Link: https://github.com/openwrt/openwrt/pull/16522 Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:

committed by
Robert Marko

parent
46506776e6
commit
346872e720
18
tools/bc/patches/000-getopt-prototype.patch
Normal file
18
tools/bc/patches/000-getopt-prototype.patch
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
--- a/h/getopt.h
|
||||||
|
+++ b/h/getopt.h
|
||||||
|
@@ -135,15 +135,7 @@ struct option
|
||||||
|
arguments to the option '\0'. This behavior is specific to the GNU
|
||||||
|
`getopt'. */
|
||||||
|
|
||||||
|
-#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__ */
|
||||||
|
-
|
||||||
|
#ifndef __need_getopt
|
||||||
|
extern int getopt_long (int ___argc, char *const *___argv,
|
||||||
|
const char *__shortopts,
|
Reference in New Issue
Block a user