From d4c4cb06c52f6ded7d55d75201fb2107e76c1586 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 24 Mar 2012 14:43:21 +0100 Subject: replace: Move memalign() from lib/util/system.c to libreplace. --- lib/replace/replace.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/replace/replace.h') 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 #endif +#ifdef HAVE_MALLOC_H +#include +#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" */ -- cgit