From e0b54d014098ec8207b486630cbce459de3bfa0a Mon Sep 17 00:00:00 2001 From: Craig Rodrigues Date: Sun, 20 Sep 2015 03:58:27 +0000 Subject: [PATCH] Add declarations to eliminate -Wmissing-prototypes warnings --- lib/libc/gen/dlfcn.c | 4 ++++ lib/libc/gen/dup3.c | 2 ++ lib/libc/gen/elf_utils.c | 3 +++ lib/libc/gen/fmtcheck.c | 1 + lib/libc/gen/getgrent.c | 2 ++ lib/libc/gen/nlist.c | 1 + lib/libc/gen/pause.c | 2 ++ lib/libc/gen/raise.c | 1 + lib/libc/gen/semctl.c | 1 + lib/libc/gen/sleep.c | 2 ++ lib/libc/gen/ttyslot.c | 2 ++ lib/libc/gen/uname.c | 2 ++ lib/libc/gen/unvis-compat.c | 2 ++ lib/libc/gen/usleep.c | 2 ++ lib/libc/gen/wait.c | 2 ++ lib/libc/gen/wait3.c | 2 ++ lib/libc/gen/waitid.c | 2 ++ lib/libc/gen/waitpid.c | 2 ++ 18 files changed, 35 insertions(+) diff --git a/lib/libc/gen/dlfcn.c b/lib/libc/gen/dlfcn.c index 7d287974fa2..f65776e8e96 100644 --- a/lib/libc/gen/dlfcn.c +++ b/lib/libc/gen/dlfcn.c @@ -41,6 +41,10 @@ __FBSDID("$FreeBSD$"); static char sorry[] = "Service unavailable"; +void _rtld_thread_init(void * li); +void _rtld_atfork_pre(int *locks); +void _rtld_atfork_post(int *locks); + /* * For ELF, the dynamic linker directly resolves references to its * services to functions inside the dynamic linker itself. These diff --git a/lib/libc/gen/dup3.c b/lib/libc/gen/dup3.c index ac8877cdc8a..b7fd9bfe924 100644 --- a/lib/libc/gen/dup3.c +++ b/lib/libc/gen/dup3.c @@ -35,6 +35,8 @@ __FBSDID("$FreeBSD$"); #include #include "un-namespace.h" +int __dup3(int oldfd, int newfd, int flags); + int __dup3(int oldfd, int newfd, int flags) { diff --git a/lib/libc/gen/elf_utils.c b/lib/libc/gen/elf_utils.c index 7bd75116c38..264d953a494 100644 --- a/lib/libc/gen/elf_utils.c +++ b/lib/libc/gen/elf_utils.c @@ -33,6 +33,9 @@ #include #include +int __elf_phdr_match_addr(struct dl_phdr_info *phdr_info, void *addr); +void __pthread_map_stacks_exec(void); + int __elf_phdr_match_addr(struct dl_phdr_info *phdr_info, void *addr) { diff --git a/lib/libc/gen/fmtcheck.c b/lib/libc/gen/fmtcheck.c index 5b3f2c4cd75..0c29f94219c 100644 --- a/lib/libc/gen/fmtcheck.c +++ b/lib/libc/gen/fmtcheck.c @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include __weak_reference(__fmtcheck, fmtcheck); +const char * __fmtcheck(const char *f1, const char *f2); enum __e_fmtcheck_types { FMTCHECK_START, diff --git a/lib/libc/gen/getgrent.c b/lib/libc/gen/getgrent.c index 93a82c2db32..dc9cabdae75 100644 --- a/lib/libc/gen/getgrent.c +++ b/lib/libc/gen/getgrent.c @@ -75,6 +75,8 @@ static const ns_src defaultsrc[] = { { NULL, 0 } }; +int __getgroupmembership(const char *uname, gid_t agroup, gid_t *groups, + int maxgrp, int *grpcnt); int __gr_match_entry(const char *, size_t, enum nss_lookup_type, const char *, gid_t); int __gr_parse_entry(char *, size_t, struct group *, char *, size_t, diff --git a/lib/libc/gen/nlist.c b/lib/libc/gen/nlist.c index 88254cd99c3..1f5769388cd 100644 --- a/lib/libc/gen/nlist.c +++ b/lib/libc/gen/nlist.c @@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$"); int __fdnlist(int, struct nlist *); int __aout_fdnlist(int, struct nlist *); int __elf_fdnlist(int, struct nlist *); +int __elf_is_okay__(Elf_Ehdr *ehdr); int nlist(const char *name, struct nlist *list) diff --git a/lib/libc/gen/pause.c b/lib/libc/gen/pause.c index ef48c1cd451..8e7a638783f 100644 --- a/lib/libc/gen/pause.c +++ b/lib/libc/gen/pause.c @@ -38,6 +38,8 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" +int __pause(void); + /* * Backwards compatible pause. */ diff --git a/lib/libc/gen/raise.c b/lib/libc/gen/raise.c index 994fea57911..46dffb17007 100644 --- a/lib/libc/gen/raise.c +++ b/lib/libc/gen/raise.c @@ -40,6 +40,7 @@ __FBSDID("$FreeBSD$"); __weak_reference(__raise, raise); __weak_reference(__raise, _raise); +int __raise(int s); int __raise(int s) diff --git a/lib/libc/gen/semctl.c b/lib/libc/gen/semctl.c index 156d18cac70..c68734d6318 100644 --- a/lib/libc/gen/semctl.c +++ b/lib/libc/gen/semctl.c @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); int __semctl(int semid, int semnum, int cmd, union semun *arg); int freebsd7___semctl(int semid, int semnum, int cmd, union semun_old *arg); +int freebsd7_semctl(int semid, int semnum, int cmd, ...); int semctl(int semid, int semnum, int cmd, ...) diff --git a/lib/libc/gen/sleep.c b/lib/libc/gen/sleep.c index 6bb4ecd8083..bfa5232a799 100644 --- a/lib/libc/gen/sleep.c +++ b/lib/libc/gen/sleep.c @@ -42,6 +42,8 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" +unsigned int __sleep(unsigned int seconds); + unsigned int __sleep(unsigned int seconds) { diff --git a/lib/libc/gen/ttyslot.c b/lib/libc/gen/ttyslot.c index 1de0837e937..397e3ad466c 100644 --- a/lib/libc/gen/ttyslot.c +++ b/lib/libc/gen/ttyslot.c @@ -33,6 +33,8 @@ static char sccsid[] = "@(#)ttyslot.c 8.1 (Berkeley) 6/4/93"; #include __FBSDID("$FreeBSD$"); +int __ttyslot(void); + int __ttyslot(void) { diff --git a/lib/libc/gen/uname.c b/lib/libc/gen/uname.c index 5a7baf7c321..29986a843ca 100644 --- a/lib/libc/gen/uname.c +++ b/lib/libc/gen/uname.c @@ -40,6 +40,8 @@ __FBSDID("$FreeBSD$"); #include #undef uname +int uname(struct utsname *name); + int uname(struct utsname *name) { diff --git a/lib/libc/gen/unvis-compat.c b/lib/libc/gen/unvis-compat.c index 080143e39df..e18fa723f78 100644 --- a/lib/libc/gen/unvis-compat.c +++ b/lib/libc/gen/unvis-compat.c @@ -34,6 +34,8 @@ #define _UNVIS_END 1 +int __unvis_44bsd(char *cp, int c, int *astate, int flag); + int __unvis_44bsd(char *cp, int c, int *astate, int flag) { diff --git a/lib/libc/gen/usleep.c b/lib/libc/gen/usleep.c index 7c35f6c6fd9..8156348b620 100644 --- a/lib/libc/gen/usleep.c +++ b/lib/libc/gen/usleep.c @@ -40,6 +40,8 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" +int __usleep(useconds_t useconds); + int __usleep(useconds_t useconds) { diff --git a/lib/libc/gen/wait.c b/lib/libc/gen/wait.c index 46a3fdd0bf5..782a459c57a 100644 --- a/lib/libc/gen/wait.c +++ b/lib/libc/gen/wait.c @@ -42,6 +42,8 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" +pid_t __wait(int *istat); + pid_t __wait(int *istat) { diff --git a/lib/libc/gen/wait3.c b/lib/libc/gen/wait3.c index 965effe4326..a34085bec51 100644 --- a/lib/libc/gen/wait3.c +++ b/lib/libc/gen/wait3.c @@ -42,6 +42,8 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" +pid_t __wait3(int *istat, int options, struct rusage *rup); + pid_t __wait3(int *istat, int options, struct rusage *rup) { diff --git a/lib/libc/gen/waitid.c b/lib/libc/gen/waitid.c index 17a2dd6920b..0ae4afdcccc 100644 --- a/lib/libc/gen/waitid.c +++ b/lib/libc/gen/waitid.c @@ -39,6 +39,8 @@ __FBSDID("$FreeBSD$"); #include "un-namespace.h" #include "libc_private.h" +int __waitid(idtype_t idtype, id_t id, siginfo_t *info, int flags); + int __waitid(idtype_t idtype, id_t id, siginfo_t *info, int flags) { diff --git a/lib/libc/gen/waitpid.c b/lib/libc/gen/waitpid.c index 5177591a67c..ed899bf49f7 100644 --- a/lib/libc/gen/waitpid.c +++ b/lib/libc/gen/waitpid.c @@ -42,6 +42,8 @@ __FBSDID("$FreeBSD$"); #include "libc_private.h" +pid_t __waitpid(pid_t pid, int *istat, int options); + pid_t __waitpid(pid_t pid, int *istat, int options) { -- 2.45.0