Skip to content

Commit

Permalink
Fix for optind in getopt on musl libc. (#31946)
Browse files Browse the repository at this point in the history
Fix for optind in getopt on musl libc.
  • Loading branch information
staticfloat authored May 10, 2019
2 parents 6f463da + 9de07ce commit 779ac77
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/jloptions.c
Original file line number Diff line number Diff line change
Expand Up @@ -620,8 +620,9 @@ JL_DLLEXPORT void jl_parse_opts(int *argcp, char ***argvp)
}
jl_options.code_coverage = codecov;
jl_options.malloc_log = malloclog;
*argvp += optind;
*argcp -= optind;
int proc_args = *argcp < optind ? *argcp : optind;
*argvp += proc_args;
*argcp -= proc_args;
}

JL_DLLEXPORT void jl_set_ARGS(int argc, char **argv)
Expand Down

0 comments on commit 779ac77

Please sign in to comment.