From: Richard Kettlewell Date: Sun, 19 Jun 2011 16:57:28 +0000 (+0100) Subject: Work around Bison's crazy redeclaration of malloc/free. X-Git-Tag: v0.2.0~53 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=secnet.git;a=commitdiff_plain;h=2b4b615531dd73456bcc71670d8744878a1684bf Work around Bison's crazy redeclaration of malloc/free. Signed-off-by: Richard Kettlewell --- diff --git a/conffile.y b/conffile.y index 1625122..7837abe 100644 --- a/conffile.y +++ b/conffile.y @@ -8,6 +8,12 @@ #include #include #include +/* Bison stupidly redeclares malloc/free unless they are #defined + * (or a bunch of madder conditions) */ +#ifndef malloc +# define malloc malloc +# define free free +#endif #include "secnet.h" #include "conffile_internal.h" #include "conffile.yy.h"