From 3476364ce9e827d95ce7e0bf06d04ed20ca5cc53 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Fri, 26 Oct 2012 15:05:35 +0200 Subject: [PATCH] BUILD: fix coexistence of openssl and zlib The crappy zlib and openssl libs both define a free_func as a different typedef. That's a very clever idea to use such a generic name in general purpose libraries, really... The zlib one is easier to redefine than openssl's, so let's only fix this one. --- src/compression.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/compression.c b/src/compression.c index 45244a075..3ff3aea9a 100644 --- a/src/compression.c +++ b/src/compression.c @@ -12,7 +12,15 @@ */ #include + +/* Note: the crappy zlib and openssl libs both define the "free_func" type. + * That's a very clever idea to use such a generic name in general purpose + * libraries, really... The zlib one is easier to redefine than openssl's, + * so let's only fix this one. + */ +#define free_func zlib_free_func #include +#undef free_func #include