diff options
author | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-09-23 20:55:59 +0000 |
---|---|---|
committer | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-09-23 20:55:59 +0000 |
commit | 0cca51cea99bf65081956e8b1e27bdc5b9d57b0c (patch) | |
tree | 64ee0afb511aa42a1611cf3efb0f1958defbc239 /cp_mv.c | |
parent | b00758e2f29a4011b4e481a283085b31fede834b (diff) | |
download | busybox-w32-0cca51cea99bf65081956e8b1e27bdc5b9d57b0c.tar.gz busybox-w32-0cca51cea99bf65081956e8b1e27bdc5b9d57b0c.tar.bz2 busybox-w32-0cca51cea99bf65081956e8b1e27bdc5b9d57b0c.zip |
Force optind=1 for libc5 when doing cp in cp_mv.c
git-svn-id: svn://busybox.net/trunk/busybox@1105 69ca8d6d-28ef-0310-b511-8ec308f3f277
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) | |||
214 | usage(cp_mv_usage[dz_i]); | 214 | usage(cp_mv_usage[dz_i]); |
215 | } | 215 | } |
216 | } else { /* (dz_i == is_mv) */ | 216 | } else { /* (dz_i == is_mv) */ |
217 | /* Initialize optind to 1, since in libc5 optind | ||
218 | * is not initialized until getopt() is called | ||
219 | * (or until sneaky programmers force it...). */ | ||
220 | optind = 1; | ||
217 | recursiveFlag = preserveFlag = TRUE; | 221 | recursiveFlag = preserveFlag = TRUE; |
218 | followLinks = FALSE; | 222 | followLinks = FALSE; |
219 | } | 223 | } |