summaryrefslogtreecommitdiffstats
path: root/extra
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>2014-03-18 16:13:54 +0200
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>2014-03-18 16:13:54 +0200
commitf4949119ada32e28959e25e46b4f3314805b5ed1 (patch)
tree6784c8b30cebe773e4ae8d140268757f231cbca4 /extra
parent607cb998b5472ef1df461995b33694e9a54bef23 (diff)
Add stdlib.h to pb_syshdr.h for dynamic allocation
Diffstat (limited to 'extra')
-rw-r--r--extra/pb_syshdr.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/extra/pb_syshdr.h b/extra/pb_syshdr.h
index b9a97a4f..1ff48230 100644
--- a/extra/pb_syshdr.h
+++ b/extra/pb_syshdr.h
@@ -53,6 +53,16 @@ typedef int bool;
#endif
+/* stdlib.h subset */
+#ifdef PB_ENABLE_MALLOC
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#else
+void *realloc(void *ptr, size_t size);
+void free(void *ptr);
+#endif
+#endif
+
/* string.h subset */
#ifdef HAVE_STRING_H
#include <string.h>