[openssh-commits] [openssh] branch master updated: Check for nlist function.

git+noreply at mindrot.org git+noreply at mindrot.org
Fri Sep 5 21:33:53 AEST 2025


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

The following commit(s) were added to refs/heads/master by this push:
     new 3ca274e44 Check for nlist function.
3ca274e44 is described below

commit 3ca274e44cb2c2351376fc14e4c3e92ba4a8f87b
Author: Darren Tucker <dtucker at dtucker.net>
AuthorDate: Fri Sep 5 21:32:30 2025 +1000

    Check for nlist function.
    
    Check for nlist function presence before attenmpting to use it instead
    of relying on the presence of the nlist.h header.  Mac OS X, in particular
    has the header, but only has the function in the 32bit libraries.
---
 configure.ac | 1 +
 misc.c       | 6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index c6cc57f25..df3869324 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2104,6 +2104,7 @@ AC_CHECK_FUNCS([ \
 	memset_s \
 	mkdtemp \
 	ngetaddrinfo \
+	nlist \
 	nsleep \
 	ogetaddrinfo \
 	openlog_r \
diff --git a/misc.c b/misc.c
index cb061d4e1..922f04606 100644
--- a/misc.c
+++ b/misc.c
@@ -3063,7 +3063,7 @@ ptimeout_isset(struct timespec *pt)
 int
 lib_contains_symbol(const char *path, const char *s)
 {
-#ifdef HAVE_NLIST_H
+#ifdef HAVE_NLIST
 	struct nlist nl[2];
 	int ret = -1, r;
 
@@ -3083,7 +3083,7 @@ lib_contains_symbol(const char *path, const char *s)
  out:
 	free(nl[0].n_name);
 	return ret;
-#else /* HAVE_NLIST_H */
+#else /* HAVE_NLIST */
 	int fd, ret = -1;
 	struct stat st;
 	void *m = NULL;
@@ -3125,7 +3125,7 @@ lib_contains_symbol(const char *path, const char *s)
 		munmap(m, sz);
 	close(fd);
 	return ret;
-#endif /* HAVE_NLIST_H */
+#endif /* HAVE_NLIST */
 }
 
 int

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list