diff --git a/configure.in b/configure.in index a28a5b7..1c94ac0 100644 --- a/configure.in +++ b/configure.in @@ -65,6 +65,8 @@ AC_CHECK_LIB(PW, main) AC_CHECK_LIB(resolv, main) AC_CHECK_LIB(crypt, main) +AC_CHECK_DECLS([strlcat, strlcpy]) + dnl Checks for header files. AC_HEADER_STDC AC_HEADER_SYS_WAIT diff --git a/src/include/config.h.in b/src/include/config.h.in index c578dd9..752cab0 100644 --- a/src/include/config.h.in +++ b/src/include/config.h.in @@ -25,6 +25,14 @@ /* Define to 1 if you have the header file. */ #undef HAVE_CRYPT_H +/* Define to 1 if you have the declaration of `strlcat', and to 0 if you + don't. */ +#undef HAVE_DECL_STRLCAT + +/* Define to 1 if you have the declaration of `strlcpy', and to 0 if you + don't. */ +#undef HAVE_DECL_STRLCPY + /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H diff --git a/src/include/pool.h b/src/include/pool.h index b478290..2727949 100644 --- a/src/include/pool.h +++ b/src/include/pool.h @@ -602,7 +602,9 @@ extern void ClientAuthentication(POOL_CONNECTION *frontend); extern void pool_getnameinfo_all(SockAddr *saddr, char *remote_host, char *remote_port); /* strlcpy.c */ -//extern size_t strlcpy(char *dst, const char *src, size_t siz); +#ifndef HAVE_DECL_STRLCPY +extern size_t strlcpy(char *dst, const char *src, size_t siz); +#endif /* ps_status.c */ extern bool update_process_title;