From 69393d06460cbe9077cdf322f96443c3807a3209 Mon Sep 17 00:00:00 2001 From: Luigi Rizzo Date: Fri, 14 Dec 2001 16:22:41 +0000 Subject: [PATCH] Add prototypes for main() so that these programs compile with -Werror (which somehow now seems to be the default for compiling -current). This error popped up while doing a PicoBSD cross-compile on a 4.3-ish system, it may well be that there are other apps which have similar problems, but I did not spot them as they are not included in my picobsd config. Whether adding prototypes for main() is the correct solution or not I have no idea, a request to -current on the matter went basically unanswered. Those who have better ideas are welcome to back this out and replace it with the correct fix. --- bin/rm/rm.c | 1 + usr.sbin/chown/chown.c | 1 + usr.sbin/dev_mkdb/dev_mkdb.c | 1 + 3 files changed, 3 insertions(+) diff --git a/bin/rm/rm.c b/bin/rm/rm.c index 4a50a649a8fc..997d41a2227c 100644 --- a/bin/rm/rm.c +++ b/bin/rm/rm.c @@ -69,6 +69,7 @@ void rm_file __P((char **)); void rm_overwrite __P((char *, struct stat *)); void rm_tree __P((char **)); void usage __P((void)); +int main __P((int argc, char *argv[])); /* * rm -- diff --git a/usr.sbin/chown/chown.c b/usr.sbin/chown/chown.c index 85db59d9e649..6f5f390d4aaf 100644 --- a/usr.sbin/chown/chown.c +++ b/usr.sbin/chown/chown.c @@ -64,6 +64,7 @@ void a_uid __P((const char *)); void chownerr __P((const char *)); u_long id __P((const char *, const char *)); void usage __P((void)); +int main __P((int argc, char *argv[])); uid_t uid; gid_t gid; diff --git a/usr.sbin/dev_mkdb/dev_mkdb.c b/usr.sbin/dev_mkdb/dev_mkdb.c index d79674ee7bb6..59676541f99e 100644 --- a/usr.sbin/dev_mkdb/dev_mkdb.c +++ b/usr.sbin/dev_mkdb/dev_mkdb.c @@ -61,6 +61,7 @@ static const char rcsid[] = #include static void usage __P((void)); +int main __P((int argc, char *argv[])); int main(argc, argv)