-diff --git c/configure.ac w/configure.ac
-index 09cb310..30c0e2a 100644
---- c/configure.ac
-+++ w/configure.ac
-@@ -110,7 +110,7 @@ AS_CASE([$host_os],
+diff --git a/configure.ac b/configure.ac
+index 5b6d22b..98c449b 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -145,7 +145,7 @@ AS_CASE([$host_os],
  AM_CONDITIONAL([OS_WINDOWS], [test "x$is_windows" = "xyes"])
  
  # Checks for header files.

 	return(src - osrc - 1);	/* count does not include NUL */
 }
+#endif
diff --git c/src/strmode.c w/src/strmode.c
index e6afde5..da680c9 100644
--- c/src/strmode.c
+++ w/src/strmode.c
@@ -32,6 +32,7 @@
 #include <sys/stat.h>
 #include <string.h>

 
 # Checks for typedefs, structures, and compiler characteristics.
 AC_C_INLINE
@@ -245,7 +245,9 @@ AC_LINK_IFELSE(
 
 AC_CHECK_FUNCS([clearenv dirfd fopencookie __fpurge \
                 getauxval getentropy getexecname getline \
-                pstat_getproc sysconf])
+                pstat_getproc sysconf \
+		strlcpy strlcat strnstr strmode fpurge \
+		user_from_uid group_from_gid])
 AM_CONDITIONAL([HAVE_GETENTROPY], [test "x$ac_cv_func_getentropy" = "xtrue"])
 
 AC_SUBST([MD5_LIBS])
diff --git a/include/bsd/grp.h b/include/bsd/grp.h
index b2705e5..c9423a2 100644
--- a/include/bsd/grp.h
+++ b/include/bsd/grp.h
@@ -44,8 +44,10 @@
 __BEGIN_DECLS
 int
 gid_from_group(const char *, gid_t *);
+#if !HAVE_GROUP_FROM_GID
 const char *
 group_from_gid(gid_t, int);
+#endif
 __END_DECLS
 
 #endif
diff --git a/include/bsd/pwd.h b/include/bsd/pwd.h
index 798af4b..6ae5244 100644
--- a/include/bsd/pwd.h
+++ b/include/bsd/pwd.h
@@ -44,8 +44,10 @@
 __BEGIN_DECLS
 int
 uid_from_user(const char *, uid_t *);
+#if !HAVE_USER_FROM_UID
 const char *
 user_from_uid(uid_t, int);
+#endif
 __END_DECLS
 
 #endif
diff --git a/include/bsd/string.h b/include/bsd/string.h
index f987fee..a1e17ed 100644
--- a/include/bsd/string.h
+++ b/include/bsd/string.h
@@ -41,10 +41,21 @@
 #include <sys/types.h>
 
