summaryrefslogtreecommitdiff
path: root/lib/replace/replace.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/replace/replace.h')
-rw-r--r--lib/replace/replace.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/replace/replace.h b/lib/replace/replace.h
index 711241462e..3f289d7f47 100644
--- a/lib/replace/replace.h
+++ b/lib/replace/replace.h
@@ -56,6 +56,10 @@
#include <inttypes.h>
#endif
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
+
#ifndef __PRI64_PREFIX
# if __WORDSIZE == 64
# define __PRI64_PREFIX "l"
@@ -157,6 +161,11 @@ void *rep_memmem(const void *haystack, size_t haystacklen,
const void *needle, size_t needlelen);
#endif
+#ifndef HAVE_MEMALIGN
+#define memalign rep_memalign
+void *rep_memalign(size_t boundary, size_t size);
+#endif
+
#ifndef HAVE_MKTIME
#define mktime rep_mktime
/* prototype is in "system/time.h" */