diff --git a/configure.in b/configure.in index a28a5b7..934542a 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_FUNCS([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..b5c7685 100644 --- a/src/include/config.h.in +++ b/src/include/config.h.in @@ -167,6 +167,12 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H +/* Define to 1 if you have the `strlcat,' function. */ +#undef HAVE_STRLCAT_ + +/* Define to 1 if you have the `strlcpy' function. */ +#undef HAVE_STRLCPY + /* Define to 1 if you have the `strtok' function. */ #undef HAVE_STRTOK diff --git a/src/include/pool.h b/src/include/pool.h index 2a5736e..11cb119 100644 --- a/src/include/pool.h +++ b/src/include/pool.h @@ -583,7 +583,9 @@ extern void ClientAuthentication(POOL_CONNECTION *frontend); extern void pool_getnameinfo_all(SockAddr *saddr, char *remote_host, char *remote_port); /* strlcpy.c */ +#ifndef HAVE_STRLCPY extern size_t strlcpy(char *dst, const char *src, size_t siz); +#endif /* ps_status.c */ extern bool update_process_title;