]> granicus.if.org Git - curl/commitdiff
zlib/brotli: only include header files in modules needing them
authorPatrick Monnerat <patrick@monnerat.net>
Mon, 13 Nov 2017 13:20:41 +0000 (14:20 +0100)
committerPatrick Monnerat <patrick@monnerat.net>
Mon, 13 Nov 2017 13:20:41 +0000 (14:20 +0100)
There is a conflict on symbol 'free_func' between openssl/crypto.h and
zlib.h on AIX. This is an attempt to resolve it.

Bug: https://curl.haxx.se/mail/lib-2017-11/0032.html
Reported-By: Michael Felt
lib/content_encoding.c
lib/urldata.h
lib/version.c

index 626bb8ec955fd91c79cdfe981fbd123105ad2c59..3d061375c57d0b3b8268f23e31e364e8fe335b10 100644 (file)
 #include "urldata.h"
 #include <curl/curl.h>
 #include <stddef.h>
+
+#ifdef HAVE_ZLIB_H
+#include <zlib.h>
+#ifdef __SYMBIAN32__
+/* zlib pollutes the namespace with this definition */
+#undef WIN32
+#endif
+#endif
+
+#ifdef HAVE_BROTLI
+#include <brotli/decode.h>
+#endif
+
 #include "sendf.h"
 #include "http.h"
 #include "content_encoding.h"
index 7dfb26b6d4bd9d34dda422f7758cf375834d50de..94f6922238aa206af439b1aa384b9044c8545dbd 100644 (file)
 
 #include "timeval.h"
 
-#ifdef HAVE_ZLIB_H
-#include <zlib.h>               /* for content-encoding */
-#ifdef __SYMBIAN32__
-/* zlib pollutes the namespace with this definition */
-#undef WIN32
-#endif
-#endif
-
-#ifdef HAVE_BROTLI
-#include <brotli/decode.h>
-#endif
-
 #include <curl/curl.h>
 
 #include "http_chunks.h" /* for the structs and enum stuff */
index 66c761e34ceeb4abded75c248dff6e9d6f57204a..79cc0bba4729121fd8cc1a335036aeac57db4326 100644 (file)
 #define CURL_LIBSSH2_VERSION LIBSSH2_VERSION
 #endif
 
+#ifdef HAVE_ZLIB_H
+#include <zlib.h>
+#ifdef __SYMBIAN32__
+/* zlib pollutes the namespace with this definition */
+#undef WIN32
+#endif
+#endif
+
+#ifdef HAVE_BROTLI
+#include <brotli/decode.h>
+#endif
+
 void Curl_version_init(void);
 
 /* For thread safety purposes this function is called by global_init so that