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

+#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

 static struct {
 	/* Original value. */
 	const char *arg0;
@@ -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. */
