Hook memmem compat code into build.
This fixes builds on platforms that don't have it (at least old DragonFly, probably others).
This commit is contained in:
parent
c7bd461729
commit
45478898f9
|
@ -1751,6 +1751,7 @@ AC_CHECK_FUNCS([ \
|
||||||
llabs \
|
llabs \
|
||||||
login_getcapbool \
|
login_getcapbool \
|
||||||
md5_crypt \
|
md5_crypt \
|
||||||
|
memmem \
|
||||||
memmove \
|
memmove \
|
||||||
memset_s \
|
memset_s \
|
||||||
mkdtemp \
|
mkdtemp \
|
||||||
|
|
|
@ -34,6 +34,7 @@ OPENBSD=base64.o \
|
||||||
inet_ntoa.o \
|
inet_ntoa.o \
|
||||||
inet_ntop.o \
|
inet_ntop.o \
|
||||||
md5.o \
|
md5.o \
|
||||||
|
memmem.o \
|
||||||
mktemp.o \
|
mktemp.o \
|
||||||
pwcache.o \
|
pwcache.o \
|
||||||
readpassphrase.o \
|
readpassphrase.o \
|
||||||
|
|
|
@ -27,6 +27,10 @@
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "includes.h"
|
||||||
|
|
||||||
|
#ifndef HAVE_MEMMEM
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -62,3 +66,4 @@ memmem(const void *l, size_t l_len, const void *s, size_t s_len)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
DEF_WEAK(memmem);
|
DEF_WEAK(memmem);
|
||||||
|
#endif /* HAVE_MEMMEM */
|
||||||
|
|
|
@ -73,6 +73,10 @@ int getpagesize(void);
|
||||||
char *getcwd(char *pt, size_t size);
|
char *getcwd(char *pt, size_t size);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_MEMMEM
|
||||||
|
void *memmem(const void *, size_t, const void *, size_t);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_REALLOCARRAY
|
#ifndef HAVE_REALLOCARRAY
|
||||||
void *reallocarray(void *, size_t, size_t);
|
void *reallocarray(void *, size_t, size_t);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue