diff options
author | Eric Andersen | 2000-09-23 20:55:59 +0000 |
---|---|---|
committer | Eric Andersen | 2000-09-23 20:55:59 +0000 |
commit | 2da90d3b58472a4df63796ea679fde1f7d2b7a78 (patch) | |
tree | 64ee0afb511aa42a1611cf3efb0f1958defbc239 /cp_mv.c | |
parent | 285b446d1777b9515bb83df7b18d17359f49f921 (diff) | |
download | busybox-2da90d3b58472a4df63796ea679fde1f7d2b7a78.zip busybox-2da90d3b58472a4df63796ea679fde1f7d2b7a78.tar.gz |
Force optind=1 for libc5 when doing cp in cp_mv.c
Diffstat (limited to 'cp_mv.c')
-rw-r--r-- | cp_mv.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -214,6 +214,10 @@ extern int cp_mv_main(int argc, char **argv) usage(cp_mv_usage[dz_i]); } } else { /* (dz_i == is_mv) */ + /* Initialize optind to 1, since in libc5 optind + * is not initialized until getopt() is called + * (or until sneaky programmers force it...). */ + optind = 1; recursiveFlag = preserveFlag = TRUE; followLinks = FALSE; } |