[openssh-commits] [openssh] 01/01: Check if memmem is declared in system headers.
git+noreply at mindrot.org
git+noreply at mindrot.org
Wed Dec 11 13:24:20 AEDT 2019
This is an automated email from the git hooks/post-receive script.
dtucker pushed a commit to branch master
in repository openssh.
commit afffd310360b155df2133d1f5f1ab2f4e939b570
Author: Darren Tucker <dtucker at dtucker.net>
Date: Wed Dec 11 13:22:06 2019 +1100
Check if memmem is declared in system headers.
If the system (or one of the dependencies) implements memmem but does
not define the header, we would not declare it either resulting in
compiler warnings. Check for declaration explicitly. bz#3102.
---
configure.ac | 2 +-
openbsd-compat/openbsd-compat.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index a12fc0d1..6e70e52c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1873,7 +1873,7 @@ AC_CHECK_FUNCS([ \
warn \
])
-AC_CHECK_DECLS([bzero])
+AC_CHECK_DECLS([bzero, memmem])
dnl Wide character support.
AC_CHECK_FUNCS([mblen mbtowc nl_langinfo wcwidth])
diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h
index afe882f9..8c97173b 100644
--- a/openbsd-compat/openbsd-compat.h
+++ b/openbsd-compat/openbsd-compat.h
@@ -74,7 +74,7 @@ int getpagesize(void);
char *getcwd(char *pt, size_t size);
#endif
-#ifndef HAVE_MEMMEM
+#if defined(HAVE_DECL_MEMMEM) && HAVE_DECL_MEMMEM == 0
void *memmem(const void *, size_t, const void *, size_t);
#endif
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list