  static struct {
  	/* Original value. */
  	const char *arg0;
-@@ -287,7 +291,8 @@ libbsd_symver_default(setproctitle, setproctitle_impl, LIBBSD_0.5);
+@@ -291,7 +295,8 @@ libbsd_symver_default(setproctitle, setproctitle_impl, LIBBSD_0.5);
   * in 0.5, make the implementation available in the old version as an alias
   * for code linking against that version, and change the default to use the
   * new version, so that new code depends on the implemented version. */

+#if !HAVE_NLIST_H
 #include "local-elf.h"
 
 #ifndef SIZE_T_MAX
@@ -282,3 +283,4 @@ nlist(const char *name, struct nlist *list)
 	(void)close(fd);
 	return (n);
 }
+#endif
diff --git c/src/readpassphrase.c w/src/readpassphrase.c
index f9f6195..2bc5fb4 100644
--- c/src/readpassphrase.c
+++ w/src/readpassphrase.c
@@ -36,6 +36,14 @@
 #define TCSASOFT 0
 #endif

 extern __typeof__(setproctitle_impl)
 setproctitle_stub
 	__attribute__((__alias__("setproctitle_impl")));
diff --git a/src/strlcat.c b/src/strlcat.c
index 14c53a1..5961c17 100644
--- a/src/strlcat.c
+++ b/src/strlcat.c
@@ -26,6 +26,7 @@
  * Returns strlen(src) + MIN(dsize, strlen(initial dst)).
  * If retval >= dsize, truncation occurred.
