add legacy function valloc
authorRich Felker <dalias@aerifal.cx>
Fri, 2 Aug 2013 22:34:39 +0000 (18:34 -0400)
committerRich Felker <dalias@aerifal.cx>
Fri, 2 Aug 2013 22:34:39 +0000 (18:34 -0400)
it was already declared in stdlib.h, but not defined anywhere.

src/legacy/valloc.c [new file with mode: 0644]

diff --git a/src/legacy/valloc.c b/src/legacy/valloc.c
new file mode 100644 (file)
index 0000000..e48cf21
--- /dev/null
@@ -0,0 +1,8 @@
+#define _BSD_SOURCE
+#include <stdlib.h>
+#include <limits.h>
+
+void *valloc(size_t size)
+{
+       return memalign(PAGE_SIZE, size);
+}