From: Willy Tarreau Date: Fri, 26 Oct 2012 13:05:35 +0000 (+0200) Subject: BUILD: fix coexistence of openssl and zlib X-Git-Tag: v1.5-dev13~112 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3476364ce9e827d95ce7e0bf06d04ed20ca5cc53;p=thirdparty%2Fhaproxy.git 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. --- diff --git a/src/compression.c b/src/compression.c index 45244a075d..3ff3aea9a7 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