aboutsummaryrefslogtreecommitdiff
path: root/loginutils/getty.c
diff options
context:
space:
mode:
Diffstat (limited to 'loginutils/getty.c')
-rw-r--r--loginutils/getty.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/loginutils/getty.c b/loginutils/getty.c
index fd5116d08..23e92bc77 100644
--- a/loginutils/getty.c
+++ b/loginutils/getty.c
@@ -131,7 +131,7 @@ struct globals {
//usage: "\n"
//usage: "\nBAUD_RATE of 0 leaves it unchanged"
-static const char opt_string[] ALIGN1 = "I:LH:f:hil:mt:+wn";
+#define OPT_STR "I:LH:f:hil:mt:+wn"
#define F_INITSTRING (1 << 0) /* -I */
#define F_LOCAL (1 << 1) /* -L */
#define F_FAKEHOST (1 << 2) /* -H */
@@ -179,8 +179,7 @@ static void parse_args(char **argv)
char *ts;
int flags;
- opt_complementary = "-2"; /* at least 2 args; -t N */
- flags = getopt32(argv, opt_string,
+ flags = getopt32(argv, "^" OPT_STR "\0" "-2"/* at least 2 args*/,
&G.initstring, &G.fakehost, &G.issue,
&G.login, &G.timeout
);