summaryrefslogtreecommitdiff
path: root/lib/replace/replace.h
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2012-03-24 14:43:21 +0100
committerJelmer Vernooij <jelmer@samba.org>2012-03-24 14:43:21 +0100
commitd4c4cb06c52f6ded7d55d75201fb2107e76c1586 (patch)
tree6f71526793427e4a3f093e07508f2e75eba43196 /lib/replace/replace.h
parent1080483319d4eb7a8cdee767fc41f7258e0e2537 (diff)
downloadsamba-d4c4cb06c52f6ded7d55d75201fb2107e76c1586.tar.gz
samba-d4c4cb06c52f6ded7d55d75201fb2107e76c1586.tar.bz2
samba-d4c4cb06c52f6ded7d55d75201fb2107e76c1586.zip
replace: Move memalign() from lib/util/system.c to libreplace.
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" */