aboutsummaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-02-03 17:28:39 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-02-03 17:28:39 +0000
commit06af2165288cd6516b89001ec9e24992619230e0 (patch)
tree840d22e507465aa6eb27c30c7ab8e80d9c469ae0 /coreutils
parentc7ba8b9d6c926231c1c191136b1ea0bc14b87771 (diff)
downloadbusybox-06af2165288cd6516b89001ec9e24992619230e0.tar.gz
suppress warnings about easch <applet>_main() having
no preceding prototype
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/basename.c1
-rw-r--r--coreutils/cal.c1
-rw-r--r--coreutils/cat.c1
-rw-r--r--coreutils/catv.c1
-rw-r--r--coreutils/chgrp.c1
-rw-r--r--coreutils/chmod.c1
-rw-r--r--coreutils/chown.c1
-rw-r--r--coreutils/chroot.c1
-rw-r--r--coreutils/cksum.c1
-rw-r--r--coreutils/cmp.c1
-rw-r--r--coreutils/comm.c1
-rw-r--r--coreutils/cp.c1
-rw-r--r--coreutils/cut.c1
-rw-r--r--coreutils/date.c1
-rw-r--r--coreutils/dd.c1
-rw-r--r--coreutils/df.c1
-rw-r--r--coreutils/diff.c1
-rw-r--r--coreutils/dirname.c1
-rw-r--r--coreutils/dos2unix.c1
-rw-r--r--coreutils/du.c1
-rw-r--r--coreutils/echo.c1
-rw-r--r--coreutils/env.c1
-rw-r--r--coreutils/expr.c1
-rw-r--r--coreutils/false.c1
-rw-r--r--coreutils/fold.c1
-rw-r--r--coreutils/head.c1
-rw-r--r--coreutils/hostid.c1
-rw-r--r--coreutils/id.c1
-rw-r--r--coreutils/install.c1
-rw-r--r--coreutils/length.c1
-rw-r--r--coreutils/ln.c1
-rw-r--r--coreutils/logname.c1
-rw-r--r--coreutils/ls.c1
-rw-r--r--coreutils/md5_sha1_sum.c1
-rw-r--r--coreutils/mkdir.c1
-rw-r--r--coreutils/mkfifo.c1
-rw-r--r--coreutils/mknod.c1
-rw-r--r--coreutils/mv.c1
-rw-r--r--coreutils/nice.c1
-rw-r--r--coreutils/nohup.c1
-rw-r--r--coreutils/od.c1
-rw-r--r--coreutils/od_bloaty.c4
-rw-r--r--coreutils/printenv.c1
-rw-r--r--coreutils/printf.c1
-rw-r--r--coreutils/pwd.c1
-rw-r--r--coreutils/realpath.c1
-rw-r--r--coreutils/rm.c1
-rw-r--r--coreutils/rmdir.c1
-rw-r--r--coreutils/seq.c1
-rw-r--r--coreutils/sleep.c1
-rw-r--r--coreutils/sort.c1
-rw-r--r--coreutils/stat.c1
-rw-r--r--coreutils/stty.c1
-rw-r--r--coreutils/sum.c1
-rw-r--r--coreutils/sync.c1
-rw-r--r--coreutils/tail.c1
-rw-r--r--coreutils/tee.c1
-rw-r--r--coreutils/test.c1
-rw-r--r--coreutils/touch.c1
-rw-r--r--coreutils/tr.c1
-rw-r--r--coreutils/true.c1
-rw-r--r--coreutils/tty.c1
-rw-r--r--coreutils/uname.c1
-rw-r--r--coreutils/uniq.c1
-rw-r--r--coreutils/usleep.c1
-rw-r--r--coreutils/uudecode.c1
-rw-r--r--coreutils/uuencode.c1
-rw-r--r--coreutils/watch.c1
-rw-r--r--coreutils/wc.c1
-rw-r--r--coreutils/who.c1
-rw-r--r--coreutils/whoami.c1
-rw-r--r--coreutils/yes.c1
72 files changed, 73 insertions, 2 deletions
diff --git a/coreutils/basename.c b/coreutils/basename.c
index 30f76dc12..46f7122c8 100644
--- a/coreutils/basename.c
+++ b/coreutils/basename.c
@@ -25,6 +25,7 @@
#include <string.h>
#include "busybox.h"
+int basename_main(int argc, char **argv);
int basename_main(int argc, char **argv)
{
size_t m, n;
diff --git a/coreutils/cal.c b/coreutils/cal.c
index 82ebf143a..3d617916e 100644
--- a/coreutils/cal.c
+++ b/coreutils/cal.c
@@ -77,6 +77,7 @@ static char *build_row(char *p, int *dp);
#define J_WEEK_LEN (WEEK_LEN + 7)
#define HEAD_SEP 2 /* spaces between day headings */
+int cal_main(int argc, char **argv);
int cal_main(int argc, char **argv)
{
struct tm *local_time;
diff --git a/coreutils/cat.c b/coreutils/cat.c
index 7a34891e8..7bab325ef 100644
--- a/coreutils/cat.c
+++ b/coreutils/cat.c
@@ -34,6 +34,7 @@ int bb_cat(char **argv)
return retval;
}
+int cat_main(int argc, char **argv);
int cat_main(int argc, char **argv)
{
getopt32(argc, argv, "u");
diff --git a/coreutils/catv.c b/coreutils/catv.c
index 66f30693a..826e0e9a6 100644
--- a/coreutils/catv.c
+++ b/coreutils/catv.c
@@ -12,6 +12,7 @@
#include "busybox.h"
+int catv_main(int argc, char **argv);
int catv_main(int argc, char **argv)
{
int retval = EXIT_SUCCESS, fd;
diff --git a/coreutils/chgrp.c b/coreutils/chgrp.c
index 465ea0ccf..eaa29cbc6 100644
--- a/coreutils/chgrp.c
+++ b/coreutils/chgrp.c
@@ -16,6 +16,7 @@
/* FIXME - move to .h */
extern int chown_main(int argc, char **argv);
+int chgrp_main(int argc, char **argv);
int chgrp_main(int argc, char **argv)
{
/* "chgrp [opts] abc file(s)" == "chown [opts] :abc file(s)" */
diff --git a/coreutils/chmod.c b/coreutils/chmod.c
index f298d0967..74788bbbe 100644
--- a/coreutils/chmod.c
+++ b/coreutils/chmod.c
@@ -64,6 +64,7 @@ static int fileAction(const char *fileName, struct stat *statbuf, void* param, i
return FALSE;
}
+int chmod_main(int argc, char **argv);
int chmod_main(int argc, char **argv)
{
int retval = EXIT_SUCCESS;
diff --git a/coreutils/chown.c b/coreutils/chown.c
index 09cf73f04..dad5ce063 100644
--- a/coreutils/chown.c
+++ b/coreutils/chown.c
@@ -53,6 +53,7 @@ static int fileAction(const char *fileName, struct stat *statbuf,
return FALSE;
}
+int chown_main(int argc, char **argv);
int chown_main(int argc, char **argv)
{
char *groupName;
diff --git a/coreutils/chroot.c b/coreutils/chroot.c
index 62cfdc244..16c743fef 100644
--- a/coreutils/chroot.c
+++ b/coreutils/chroot.c
@@ -11,6 +11,7 @@
#include "busybox.h"
+int chroot_main(int argc, char **argv);
int chroot_main(int argc, char **argv)
{
if (argc < 2) {
diff --git a/coreutils/cksum.c b/coreutils/cksum.c
index 52213328c..66a255c4e 100644
--- a/coreutils/cksum.c
+++ b/coreutils/cksum.c
@@ -8,6 +8,7 @@
#include "busybox.h"
+int cksum_main(int argc, char **argv);
int cksum_main(int argc, char **argv)
{
diff --git a/coreutils/cmp.c b/coreutils/cmp.c
index 71007eac1..0aebd4b4d 100644
--- a/coreutils/cmp.c
+++ b/coreutils/cmp.c
@@ -42,6 +42,7 @@ static const char opt_chars[] = "sl";
#define CMP_OPT_s (1<<0)
#define CMP_OPT_l (1<<1)
+int cmp_main(int argc, char **argv);
int cmp_main(int argc, char **argv)
{
FILE *fp1, *fp2, *outfile = stdout;
diff --git a/coreutils/comm.c b/coreutils/comm.c
index 91f017753..b6412968d 100644
--- a/coreutils/comm.c
+++ b/coreutils/comm.c
@@ -108,6 +108,7 @@ static void cmp_files(char **infiles)
fclose(streams[1]);
}
+int comm_main(int argc, char **argv);
int comm_main(int argc, char **argv)
{
unsigned long flags;
diff --git a/coreutils/cp.c b/coreutils/cp.c
index 47ad85ecf..7b0de477b 100644
--- a/coreutils/cp.c
+++ b/coreutils/cp.c
@@ -17,6 +17,7 @@
#include "busybox.h"
#include "libcoreutils/coreutils.h"
+int cp_main(int argc, char **argv);
int cp_main(int argc, char **argv)
{
struct stat source_stat;
diff --git a/coreutils/cut.c b/coreutils/cut.c
index a72b2c29a..22014fcfb 100644
--- a/coreutils/cut.c
+++ b/coreutils/cut.c
@@ -162,6 +162,7 @@ static void cut_file(FILE * file)
static const char _op_on_field[] = " only when operating on fields";
+int cut_main(int argc, char **argv);
int cut_main(int argc, char **argv)
{
char *sopt, *ltok;
diff --git a/coreutils/date.c b/coreutils/date.c
index 034a18b98..dfc8b2f40 100644
--- a/coreutils/date.c
+++ b/coreutils/date.c
@@ -44,6 +44,7 @@ static void maybe_set_utc(int opt)
xputenv((char*)"TZ=UTC0");
}
+int date_main(int argc, char **argv);
int date_main(int argc, char **argv)
{
time_t tm;
diff --git a/coreutils/dd.c b/coreutils/dd.c
index 01f37abeb..4a094e81a 100644
--- a/coreutils/dd.c
+++ b/coreutils/dd.c
@@ -50,6 +50,7 @@ static ssize_t full_write_or_warn(int fd, const void *buf, size_t len,
#define XATOU_SFX xatoul_sfx
#endif
+int dd_main(int argc, char **argv);
int dd_main(int argc, char **argv)
{
enum {
diff --git a/coreutils/df.c b/coreutils/df.c
index 3b3292590..484cabb37 100644
--- a/coreutils/df.c
+++ b/coreutils/df.c
@@ -33,6 +33,7 @@ static long kscale(long b, long bs)
}
#endif
+int df_main(int argc, char **argv);
int df_main(int argc, char **argv)
{
long blocks_used;
diff --git a/coreutils/diff.c b/coreutils/diff.c
index c846e2b69..31c20f052 100644
--- a/coreutils/diff.c
+++ b/coreutils/diff.c
@@ -1170,6 +1170,7 @@ static void diffdir(char *p1, char *p2)
#endif
+int diff_main(int argc, char **argv);
int diff_main(int argc, char **argv)
{
bool gotstdin = 0;
diff --git a/coreutils/dirname.c b/coreutils/dirname.c
index e986a9701..4ecde3147 100644
--- a/coreutils/dirname.c
+++ b/coreutils/dirname.c
@@ -14,6 +14,7 @@
#include <stdlib.h>
#include "busybox.h"
+int dirname_main(int argc, char **argv);
int dirname_main(int argc, char **argv)
{
if (argc != 2) {
diff --git a/coreutils/dos2unix.c b/coreutils/dos2unix.c
index 1ed8771c0..62c1361b2 100644
--- a/coreutils/dos2unix.c
+++ b/coreutils/dos2unix.c
@@ -82,6 +82,7 @@ static int convert(char *fn)
return 0;
}
+int dos2unix_main(int argc, char *argv[]);
int dos2unix_main(int argc, char *argv[])
{
int o;
diff --git a/coreutils/du.c b/coreutils/du.c
index a4b3c817e..eceb646d1 100644
--- a/coreutils/du.c
+++ b/coreutils/du.c
@@ -143,6 +143,7 @@ static long du(const char * const filename)
return sum;
}
+int du_main(int argc, char **argv);
int du_main(int argc, char **argv)
{
long total;
diff --git a/coreutils/echo.c b/coreutils/echo.c
index 0c8eac3bc..8270fc006 100644
--- a/coreutils/echo.c
+++ b/coreutils/echo.c
@@ -112,6 +112,7 @@ just_echo:
return 0;
}
+int echo_main(int argc, char** argv);
int echo_main(int argc, char** argv)
{
(void)bb_echo(argv);
diff --git a/coreutils/env.c b/coreutils/env.c
index e4cad271b..04279f3e0 100644
--- a/coreutils/env.c
+++ b/coreutils/env.c
@@ -41,6 +41,7 @@ static const struct option env_long_options[] = {
};
#endif
+int env_main(int argc, char** argv);
int env_main(int argc, char** argv)
{
static char *cleanenv[1] = { NULL };
diff --git a/coreutils/expr.c b/coreutils/expr.c
index 469d467bf..62d1f3a8f 100644
--- a/coreutils/expr.c
+++ b/coreutils/expr.c
@@ -74,6 +74,7 @@ static int toarith(VALUE * v);
static void freev(VALUE * v);
static void tostring(VALUE * v);
+int expr_main(int argc, char **argv);
int expr_main(int argc, char **argv)
{
VALUE *v;
diff --git a/coreutils/false.c b/coreutils/false.c
index 084bc0c1e..2a26e0e28 100644
--- a/coreutils/false.c
+++ b/coreutils/false.c
@@ -13,6 +13,7 @@
#include <stdlib.h>
#include "busybox.h"
+int false_main(int ATTRIBUTE_UNUSED argc, char ATTRIBUTE_UNUSED **argv);
int false_main(int ATTRIBUTE_UNUSED argc, char ATTRIBUTE_UNUSED **argv)
{
return EXIT_FAILURE;
diff --git a/coreutils/fold.c b/coreutils/fold.c
index 490882f6d..4ce52cf0b 100644
--- a/coreutils/fold.c
+++ b/coreutils/fold.c
@@ -38,6 +38,7 @@ static int adjust_column(int column, char c)
return column;
}
+int fold_main(int argc, char **argv);
int fold_main(int argc, char **argv)
{
char *w_opt;
diff --git a/coreutils/head.c b/coreutils/head.c
index 59b4d552c..ed1d01d52 100644
--- a/coreutils/head.c
+++ b/coreutils/head.c
@@ -31,6 +31,7 @@ static const struct suffix_mult head_suffixes[] = {
static const char header_fmt_str[] = "\n==> %s <==\n";
+int head_main(int argc, char **argv);
int head_main(int argc, char **argv)
{
unsigned long count = 10;
diff --git a/coreutils/hostid.c b/coreutils/hostid.c
index 65447aa63..51a76c631 100644
--- a/coreutils/hostid.c
+++ b/coreutils/hostid.c
@@ -13,6 +13,7 @@
#include <unistd.h>
#include "busybox.h"
+int hostid_main(int argc, char ATTRIBUTE_UNUSED **argv);
int hostid_main(int argc, char ATTRIBUTE_UNUSED **argv)
{
if (argc > 1) {
diff --git a/coreutils/id.c b/coreutils/id.c
index 36007ae55..963ee0566 100644
--- a/coreutils/id.c
+++ b/coreutils/id.c
@@ -39,6 +39,7 @@ static short printf_full(unsigned int id, const char *arg, const char prefix)
return status;
}
+int id_main(int argc, char **argv);
int id_main(int argc, char **argv)
{
struct passwd *p;
diff --git a/coreutils/install.c b/coreutils/install.c
index c899158aa..dd73fb693 100644
--- a/coreutils/install.c
+++ b/coreutils/install.c
@@ -25,6 +25,7 @@ static const struct option install_long_options[] = {
};
#endif
+int install_main(int argc, char **argv);
int install_main(int argc, char **argv)
{
struct stat statbuf;
diff --git a/coreutils/length.c b/coreutils/length.c
index 6413be007..1dc122cc1 100644
--- a/coreutils/length.c
+++ b/coreutils/length.c
@@ -7,6 +7,7 @@
#include <stdio.h>
#include "busybox.h"
+int length_main(int argc, char **argv);
int length_main(int argc, char **argv)
{
if ((argc != 2) || (**(++argv) == '-')) {
diff --git a/coreutils/ln.c b/coreutils/ln.c
index a307e5579..720713475 100644
--- a/coreutils/ln.c
+++ b/coreutils/ln.c
@@ -19,6 +19,7 @@
#define LN_BACKUP 8
#define LN_SUFFIX 16
+int ln_main(int argc, char **argv);
int ln_main(int argc, char **argv)
{
int status = EXIT_SUCCESS;
diff --git a/coreutils/logname.c b/coreutils/logname.c
index 695a736c6..743e2291c 100644
--- a/coreutils/logname.c
+++ b/coreutils/logname.c
@@ -25,6 +25,7 @@
#include <unistd.h>
#include "busybox.h"
+int logname_main(int argc, char ATTRIBUTE_UNUSED **argv);
int logname_main(int argc, char ATTRIBUTE_UNUSED **argv)
{
const char *p;
diff --git a/coreutils/ls.c b/coreutils/ls.c
index 067e463ee..798bc8201 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -773,6 +773,7 @@ static const unsigned opt_flags[] = {
};
+int ls_main(int argc, char **argv);
int ls_main(int argc, char **argv)
{
struct dnode **dnd;
diff --git a/coreutils/md5_sha1_sum.c b/coreutils/md5_sha1_sum.c
index d945ce7e0..417e90b00 100644
--- a/coreutils/md5_sha1_sum.c
+++ b/coreutils/md5_sha1_sum.c
@@ -78,6 +78,7 @@ static uint8_t *hash_file(const char *filename, hash_algo_t hash_algo)
return hash_value;
}
+int md5_sha1_sum_main(int argc, char **argv);
int md5_sha1_sum_main(int argc, char **argv)
{
int return_value = EXIT_SUCCESS;
diff --git a/coreutils/mkdir.c b/coreutils/mkdir.c
index 2cc9c7a4c..67819e784 100644
--- a/coreutils/mkdir.c
+++ b/coreutils/mkdir.c
@@ -29,6 +29,7 @@ static const struct option mkdir_long_options[] = {
};
#endif
+int mkdir_main(int argc, char **argv);
int mkdir_main(int argc, char **argv)
{
mode_t mode = (mode_t)(-1);
diff --git a/coreutils/mkfifo.c b/coreutils/mkfifo.c
index 24d27e7c0..6d8aa413e 100644
--- a/coreutils/mkfifo.c
+++ b/coreutils/mkfifo.c
@@ -16,6 +16,7 @@
#include "busybox.h"
#include "libcoreutils/coreutils.h"
+int mkfifo_main(int argc, char **argv);
int mkfifo_main(int argc, char **argv)
{
mode_t mode;
diff --git a/coreutils/mknod.c b/coreutils/mknod.c
index 8ca511cd5..6fa6d8353 100644
--- a/coreutils/mknod.c
+++ b/coreutils/mknod.c
@@ -17,6 +17,7 @@
static const char modes_chars[] = { 'p', 'c', 'u', 'b', 0, 1, 1, 2 };
static const mode_t modes_cubp[] = { S_IFIFO, S_IFCHR, S_IFBLK };
+int mknod_main(int argc, char **argv);
int mknod_main(int argc, char **argv)
{
mode_t mode;
diff --git a/coreutils/mv.c b/coreutils/mv.c
index 353124b35..7d4905fc9 100644
--- a/coreutils/mv.c
+++ b/coreutils/mv.c
@@ -35,6 +35,7 @@ static const struct option mv_long_options[] = {
static const char fmt[] = "cannot overwrite %sdirectory with %sdirectory";
+int mv_main(int argc, char **argv);
int mv_main(int argc, char **argv)
{
struct stat dest_stat;
diff --git a/coreutils/nice.c b/coreutils/nice.c
index 293861842..b7bff6a52 100644
--- a/coreutils/nice.c
+++ b/coreutils/nice.c
@@ -10,6 +10,7 @@
#include <sys/resource.h>
#include "busybox.h"
+int nice_main(int argc, char **argv);
int nice_main(int argc, char **argv)
{
int old_priority, adjustment;
diff --git a/coreutils/nohup.c b/coreutils/nohup.c
index 317d2a8ae..a9944b7f4 100644
--- a/coreutils/nohup.c
+++ b/coreutils/nohup.c
@@ -12,6 +12,7 @@
#include "busybox.h"
+int nohup_main(int argc, char **argv);
int nohup_main(int argc, char **argv)
{
int nullfd;
diff --git a/coreutils/od.c b/coreutils/od.c
index ab92dacbb..0de9def5a 100644
--- a/coreutils/od.c
+++ b/coreutils/od.c
@@ -156,6 +156,7 @@ static const char od_o2si[] = {
0xb, 1, 8, 9,
};
+int od_main(int argc, char **argv);
int od_main(int argc, char **argv)
{
int ch;
diff --git a/coreutils/od_bloaty.c b/coreutils/od_bloaty.c
index fae41afae..f060c0ace 100644
--- a/coreutils/od_bloaty.c
+++ b/coreutils/od_bloaty.c
@@ -1207,8 +1207,8 @@ dump_strings(void)
check_and_close();
}
-int
-od_main(int argc, char **argv)
+int od_main(int argc, char **argv);
+int od_main(int argc, char **argv)
{
static const struct suffix_mult bkm[] = {
{ "b", 512 },
diff --git a/coreutils/printenv.c b/coreutils/printenv.c
index ec50f7151..1d41eeb7b 100644
--- a/coreutils/printenv.c
+++ b/coreutils/printenv.c
@@ -13,6 +13,7 @@
#include <stdlib.h>
#include "busybox.h"
+int printenv_main(int argc, char **argv);
int printenv_main(int argc, char **argv)
{
extern char **environ;
diff --git a/coreutils/printf.c b/coreutils/printf.c
index 924499b29..0180d0e5a 100644
--- a/coreutils/printf.c
+++ b/coreutils/printf.c
@@ -109,6 +109,7 @@ static void print_esc_string(char *str)
}
}
+int printf_main(int argc, char **argv);
int printf_main(int argc, char **argv)
{
char *format;
diff --git a/coreutils/pwd.c b/coreutils/pwd.c
index bd36d627e..b4599b4f3 100644
--- a/coreutils/pwd.c
+++ b/coreutils/pwd.c
@@ -11,6 +11,7 @@
#include <stdlib.h>
#include "busybox.h"
+int pwd_main(int argc, char **argv);
int pwd_main(int argc, char **argv)
{
char *buf;
diff --git a/coreutils/realpath.c b/coreutils/realpath.c
index 7fac471eb..b3f7e4957 100644
--- a/coreutils/realpath.c
+++ b/coreutils/realpath.c
@@ -12,6 +12,7 @@
#include "busybox.h"
+int realpath_main(int argc, char **argv);
int realpath_main(int argc, char **argv)
{
int retval = EXIT_SUCCESS;
diff --git a/coreutils/rm.c b/coreutils/rm.c
index 5df7d5f65..1883feed8 100644
--- a/coreutils/rm.c
+++ b/coreutils/rm.c
@@ -18,6 +18,7 @@
#include <unistd.h>
#include "busybox.h"
+int rm_main(int argc, char **argv);
int rm_main(int argc, char **argv)
{
int status = 0;
diff --git a/coreutils/rmdir.c b/coreutils/rmdir.c
index c61bae795..8cbd6f1fa 100644
--- a/coreutils/rmdir.c
+++ b/coreutils/rmdir.c
@@ -15,6 +15,7 @@
#include <libgen.h>
#include "busybox.h"
+int rmdir_main(int argc, char **argv);
int rmdir_main(int argc, char **argv)
{
int status = EXIT_SUCCESS;
diff --git a/coreutils/seq.c b/coreutils/seq.c
index f2b4706f2..e81a4660a 100644
--- a/coreutils/seq.c
+++ b/coreutils/seq.c
@@ -11,6 +11,7 @@
#include <stdlib.h>
#include "busybox.h"
+int seq_main(int argc, char **argv);
int seq_main(int argc, char **argv)
{
double last, first, increment, i;
diff --git a/coreutils/sleep.c b/coreutils/sleep.c
index e32e2157d..b89b0fe9c 100644
--- a/coreutils/sleep.c
+++ b/coreutils/sleep.c
@@ -33,6 +33,7 @@ static const struct suffix_mult sfx[] = {
};
#endif
+int sleep_main(int argc, char **argv);
int sleep_main(int argc, char **argv)
{
unsigned int duration;
diff --git a/coreutils/sort.c b/coreutils/sort.c
index 29cadf5f6..e2c7b1dbf 100644
--- a/coreutils/sort.c
+++ b/coreutils/sort.c
@@ -271,6 +271,7 @@ static unsigned str2u(char **str)
}
#endif
+int sort_main(int argc, char **argv);
int sort_main(int argc, char **argv)
{
FILE *fp, *outfile = stdout;
diff --git a/coreutils/stat.c b/coreutils/stat.c
index 31dd6624e..ff14a1599 100644
--- a/coreutils/stat.c
+++ b/coreutils/stat.c
@@ -515,6 +515,7 @@ static int do_stat(char const *filename, char const *format)
return 1;
}
+int stat_main(int argc, char **argv);
int stat_main(int argc, char **argv)
{
int i;
diff --git a/coreutils/stty.c b/coreutils/stty.c
index 4e665bcb7..c354aac9c 100644
--- a/coreutils/stty.c
+++ b/coreutils/stty.c
@@ -907,6 +907,7 @@ static void set_control_char_or_die(const struct control_info *info,
#define STTY_verbose_output (1<<2)
#define STTY_recoverable_output (1<<3)
#define STTY_noargs (1<<4)
+int stty_main(int argc, char **argv);
int stty_main(int argc, char **argv)
{
struct termios mode;
diff --git a/coreutils/sum.c b/coreutils/sum.c
index d62f2cfde..9327ca55e 100644
--- a/coreutils/sum.c
+++ b/coreutils/sum.c
@@ -74,6 +74,7 @@ static unsigned sum_file(const char *file, const unsigned type)
#undef buf
}
+int sum_main(int argc, char **argv);
int sum_main(int argc, char **argv)
{
unsigned n;
diff --git a/coreutils/sync.c b/coreutils/sync.c
index 59f0b504a..536c57a17 100644
--- a/coreutils/sync.c
+++ b/coreutils/sync.c
@@ -13,6 +13,7 @@
#include <unistd.h>
#include "busybox.h"
+int sync_main(int argc, char **argv);
int sync_main(int argc, char **argv)
{
bb_warn_ignoring_args(argc - 1);
diff --git a/coreutils/tail.c b/coreutils/tail.c
index 2a1645309..52bacb7ed 100644
--- a/coreutils/tail.c
+++ b/coreutils/tail.c
@@ -68,6 +68,7 @@ static unsigned eat_num(const char *p) {
return xatou_sfx(p, tail_suffixes);
}
+int tail_main(int argc, char **argv);
int tail_main(int argc, char **argv)
{
unsigned count = 10;
diff --git a/coreutils/tee.c b/coreutils/tee.c
index 248fd1445..338232ce9 100644
--- a/coreutils/tee.c
+++ b/coreutils/tee.c
@@ -13,6 +13,7 @@
#include "busybox.h"
#include <signal.h>
+int tee_main(int argc, char **argv);
int tee_main(int argc, char **argv)
{
const char *mode = "w\0a";
diff --git a/coreutils/test.c b/coreutils/test.c
index d3d760467..6e0d5d38e 100644
--- a/coreutils/test.c
+++ b/coreutils/test.c
@@ -578,6 +578,7 @@ static int is_a_group_member(gid_t gid)
/* applet entry point */
+int test_main(int argc, char **argv);
int test_main(int argc, char **argv)
{
return bb_test(argc, argv);
diff --git a/coreutils/touch.c b/coreutils/touch.c
index 72bf904f8..ae4e689f1 100644
--- a/coreutils/touch.c
+++ b/coreutils/touch.c
@@ -26,6 +26,7 @@
#include <stdlib.h>
#include "busybox.h"
+int touch_main(int argc, char **argv);
int touch_main(int argc, char **argv)
{
int fd;
diff --git a/coreutils/tr.c b/coreutils/tr.c
index 237ade047..cea3b05b6 100644
--- a/coreutils/tr.c
+++ b/coreutils/tr.c
@@ -193,6 +193,7 @@ static int complement(char *buffer, int buffer_len)
return ix;
}
+int tr_main(int argc, char **argv);
int tr_main(int argc, char **argv)
{
unsigned char *ptr;
diff --git a/coreutils/true.c b/coreutils/true.c
index 388e897c0..b2f3a9bad 100644
--- a/coreutils/true.c
+++ b/coreutils/true.c
@@ -13,6 +13,7 @@
#include <stdlib.h>
#include "busybox.h"
+int true_main(int argc, char **argv);
int true_main(int argc, char **argv)
{
return EXIT_SUCCESS;
diff --git a/coreutils/tty.c b/coreutils/tty.c
index fee4b8b9f..c28aa33d7 100644
--- a/coreutils/tty.c
+++ b/coreutils/tty.c
@@ -15,6 +15,7 @@
#include <unistd.h>
#include "busybox.h"
+int tty_main(int argc, char **argv);
int tty_main(int argc, char **argv)
{
const char *s;
diff --git a/coreutils/uname.c b/coreutils/uname.c
index 5a3eafe92..2faa89321 100644
--- a/coreutils/uname.c
+++ b/coreutils/uname.c
@@ -54,6 +54,7 @@ static const unsigned short int utsname_offset[] = {
offsetof(uname_info_t,processor)
};
+int uname_main(int argc, char **argv);
int uname_main(int argc, char **argv)
{
uname_info_t uname_info;
diff --git a/coreutils/uniq.c b/coreutils/uniq.c
index 100f2be00..0cc0c83b3 100644
--- a/coreutils/uniq.c
+++ b/coreutils/uniq.c
@@ -26,6 +26,7 @@ static FILE *xgetoptfile_uniq_s(char **argv, int read0write2)
return (read0write2) ? stdout : stdin;
}
+int uniq_main(int argc, char **argv);
int uniq_main(int argc, char **argv)
{
FILE *in, *out;
diff --git a/coreutils/usleep.c b/coreutils/usleep.c
index de473a7b2..7dd914638 100644
--- a/coreutils/usleep.c
+++ b/coreutils/usleep.c
@@ -14,6 +14,7 @@
#include <unistd.h>
#include "busybox.h"
+int usleep_main(int argc, char **argv);
int usleep_main(int argc, char **argv)
{
if (argc != 2) {
diff --git a/coreutils/uudecode.c b/coreutils/uudecode.c
index 92272a967..c195a3e6f 100644
--- a/coreutils/uudecode.c
+++ b/coreutils/uudecode.c
@@ -123,6 +123,7 @@ static void read_base64(FILE *src_stream, FILE *dst_stream)
}
}
+int uudecode_main(int argc, char **argv);
int uudecode_main(int argc, char **argv)
{
FILE *src_stream;
diff --git a/coreutils/uuencode.c b/coreutils/uuencode.c
index e8f8d541c..3207d7296 100644
--- a/coreutils/uuencode.c
+++ b/coreutils/uuencode.c
@@ -13,6 +13,7 @@
#define SRC_BUF_SIZE 45 // This *MUST* be a multiple of 3
#define DST_BUF_SIZE 4 * ((SRC_BUF_SIZE + 2) / 3)
+int uuencode_main(int argc, char **argv);
int uuencode_main(int argc, char **argv)
{
const size_t src_buf_size = SRC_BUF_SIZE;
diff --git a/coreutils/watch.c b/coreutils/watch.c
index 81856c867..60a4a71ce 100644
--- a/coreutils/watch.c
+++ b/coreutils/watch.c
@@ -23,6 +23,7 @@
//
// (procps 3.x and procps 2.x are forks, not newer/older versions of the same)
+int watch_main(int argc, char **argv);
int watch_main(int argc, char **argv)
{
unsigned opt;
diff --git a/coreutils/wc.c b/coreutils/wc.c
index d89cb45f6..926b3ac19 100644
--- a/coreutils/wc.c
+++ b/coreutils/wc.c
@@ -68,6 +68,7 @@ enum {
WC_LENGTH = 3
};
+int wc_main(int argc, char **argv);
int wc_main(int argc, char **argv)
{
FILE *fp;
diff --git a/coreutils/who.c b/coreutils/who.c
index 4cd42652b..25d35fad9 100644
--- a/coreutils/who.c
+++ b/coreutils/who.c
@@ -38,6 +38,7 @@ static const char * idle_string (time_t t)
return "old";
}
+int who_main(int argc, char **argv);
int who_main(int argc, char **argv)
{
struct utmp *ut;
diff --git a/coreutils/whoami.c b/coreutils/whoami.c
index df714f22c..3185817b6 100644
--- a/coreutils/whoami.c
+++ b/coreutils/whoami.c
@@ -14,6 +14,7 @@
#include <unistd.h>
#include "busybox.h"
+int whoami_main(int argc, char **argv);
int whoami_main(int argc, char **argv)
{
if (argc > 1)
diff --git a/coreutils/yes.c b/coreutils/yes.c
index fc6e611e6..2611c3e82 100644
--- a/coreutils/yes.c
+++ b/coreutils/yes.c
@@ -16,6 +16,7 @@
#include "busybox.h"
+int yes_main(int argc, char **argv);
int yes_main(int argc, char **argv)
{
static const char fmt_str[] = " %s";