2006-12-19 Daniel Nauck <dna@mono-project.de>
[mono.git] / support / zlib_macros.c
index 69423f2339bd5b533a7fdc0b529d753748889241..dc851a7f6c2c2cac02c34dda7eaf28cf985d0a46 100644 (file)
@@ -15,6 +15,11 @@ create_z_stream(int compress, unsigned char gzip)
        z_stream *z;
        int retval;
 
+#if !defined(ZLIB_VERNUM) || (ZLIB_VERNUM < 0x1204)
+       /* Older versions of zlib do not support raw deflate or gzip */
+       return NULL;
+#endif
+
        z = malloc (sizeof (z_stream));
        z->next_in = Z_NULL;
        z->avail_in = 0;