diff --git a/compat/getopt.c b/compat/getopt.c index 03ad9e80..9cd3b3d2 100644 --- a/compat/getopt.c +++ b/compat/getopt.c @@ -94,7 +94,7 @@ BSDgetopt(int nargc, char *const *nargv, const char *ostr) } else { /* need an argument */ if (*place) /* no white space */ - BSDoptarg = place; + BSDoptarg = (char *)place; else if (nargc <= ++BSDoptind) { /* no arg */ place = EMSG; if (*ostr == ':')