aboutsummaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/stdlib/getopt.c3
-rw-r--r--lib/libc/stdlib/getopt_long.c4
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/libc/stdlib/getopt.c b/lib/libc/stdlib/getopt.c
index b6bdf8a1eeaf..b7f2229a2f54 100644
--- a/lib/libc/stdlib/getopt.c
+++ b/lib/libc/stdlib/getopt.c
@@ -54,8 +54,7 @@ char *optarg; /* argument associated with option */
#define BADCH (int)'?'
#define BADARG (int)':'
-#define EMSG ""
-
+static char EMSG[] = "";
/*
* getopt --
* Parse argc/argv argument vector.
diff --git a/lib/libc/stdlib/getopt_long.c b/lib/libc/stdlib/getopt_long.c
index 4d92fd0cd45d..1f3548bef9ad 100644
--- a/lib/libc/stdlib/getopt_long.c
+++ b/lib/libc/stdlib/getopt_long.c
@@ -88,7 +88,7 @@ char *optarg; /* argument associated with option */
#define BADARG ((*options == ':') ? (int)':' : (int)'?')
#define INORDER (int)1
-#define EMSG ""
+static char EMSG[] = "";
#ifdef GNU_COMPATIBLE
#define NO_PREFIX (-1)
@@ -194,7 +194,7 @@ parse_long_options(char * const *nargv, const char *options,
{
char *current_argv, *has_equal;
#ifdef GNU_COMPATIBLE
- char *current_dash;
+ const char *current_dash;
#endif
size_t current_argv_len;
int i, match, exact_match, second_partial_match;