Add stdlib.h to pb_syshdr.h for dynamic allocation

This commit is contained in:
Petteri Aimonen
2014-03-18 16:13:54 +02:00
parent 607cb998b5
commit f4949119ad
2 changed files with 12 additions and 0 deletions

View File

@@ -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>