diff --git a/lib/otp/otp_parse.c b/lib/otp/otp_parse.c index 45b167f1e..9bbb972ae 100644 --- a/lib/otp/otp_parse.c +++ b/lib/otp/otp_parse.c @@ -45,6 +45,9 @@ RCSID("$Id$"); #include #include #include + +#include "proto.h" +#include "roken.h" #include "otp.h" struct e { @@ -2120,8 +2123,9 @@ get_stdword (char *s, void *v) e.s = s; e.n = -1; - r = bsearch (&e, inv_std_dict, sizeof(inv_std_dict)/sizeof(*inv_std_dict), - sizeof(*inv_std_dict), cmp); + r = (struct e *) bsearch (&e, inv_std_dict, + sizeof(inv_std_dict)/sizeof(*inv_std_dict), + sizeof(*inv_std_dict), cmp); if (r) return r->n; else diff --git a/lib/roken/getcwd.c b/lib/roken/getcwd.c index 281267a92..cf8d813cb 100644 --- a/lib/roken/getcwd.c +++ b/lib/roken/getcwd.c @@ -43,6 +43,9 @@ RCSID("$Id$"); #include +#include "protos.h" +#include "roken.h" + char* getcwd(char *path, int size) { diff --git a/lib/roken/roken.h b/lib/roken/roken.h index a2aeba31b..59c048e7e 100644 --- a/lib/roken/roken.h +++ b/lib/roken/roken.h @@ -120,7 +120,7 @@ int inet_aton(const char *cp, struct in_addr *adr); #endif #endif -#if !defined(HAVE_GETCWD) +#if !defined(HAVE_GETCWD) || defined(BROKEN_GETCWD) char* getcwd(char *path, int size); #endif diff --git a/lib/roken/roken.h.in b/lib/roken/roken.h.in index a2aeba31b..59c048e7e 100644 --- a/lib/roken/roken.h.in +++ b/lib/roken/roken.h.in @@ -120,7 +120,7 @@ int inet_aton(const char *cp, struct in_addr *adr); #endif #endif -#if !defined(HAVE_GETCWD) +#if !defined(HAVE_GETCWD) || defined(BROKEN_GETCWD) char* getcwd(char *path, int size); #endif