Fix the pwd and group functions. The bb_ stuff was a leftover from
[oweals/busybox.git] / cp_mv.c
diff --git a/cp_mv.c b/cp_mv.c
index 55483505f550bccf6adeb43b5e52ba4d2584fbb6..dbd2fddf56dae3e7aa5f844996afcab872125f20 100644 (file)
--- a/cp_mv.c
+++ b/cp_mv.c
@@ -3,7 +3,7 @@
  * Mini `cp' and `mv' implementation for BusyBox.
  *
  *
- * Copyright (C) 1999 by Lineo, inc.
+ * Copyright (C) 1999,2000,2001 by Lineo, inc.
  * Written by Erik Andersen <andersen@lineo.com>, <andersee@debian.org>
  *
  * Copyright (C) 2000 by BitterSweet Enterprises, LLC. (GPL)
@@ -42,6 +42,7 @@
 #include <unistd.h>
 #include <errno.h>
 #include <getopt.h>
+#include <stdlib.h>
 
 static const int is_cp = 0;
 static const int is_mv = 1;
@@ -175,8 +176,8 @@ extern int cp_mv_main(int argc, char **argv)
 {
        volatile int i;
        int c;
-       char baseDestName[BUFSIZ + 1]; /* not declared globally == less bss used */
-       pBaseDestName = baseDestName; /* but available globally */
+       RESERVE_BB_BUFFER(baseDestName,BUFSIZ + 1);
+       pBaseDestName = baseDestName; /* available globally */
 
        if (*applet_name == 'c' && *(applet_name + 1) == 'p')
                dz_i = is_cp;