From: Christos Zoulas Date: Wed, 18 Jan 2017 16:33:57 +0000 (+0000) Subject: PR/574: osm0sis: Handle android having zlib.h and no -lz. X-Git-Tag: FILE5_30~16 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=202b643eb9dc09551453a1f6c10d5765c4640828;p=file PR/574: osm0sis: Handle android having zlib.h and no -lz. --- diff --git a/src/compress.c b/src/compress.c index 32920c3d..db0602a7 100644 --- a/src/compress.c +++ b/src/compress.c @@ -35,7 +35,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: compress.c,v 1.99 2016/09/16 12:12:05 christos Exp $") +FILE_RCSID("@(#)$File: compress.c,v 1.100 2016/10/24 18:02:17 christos Exp $") #endif #include "magic.h" @@ -62,7 +62,7 @@ typedef void (*sig_t)(int); #if defined(HAVE_SYS_TIME_H) #include #endif -#if defined(HAVE_ZLIB_H) +#if defined(HAVE_ZLIB_H) && defined(ZLIBSUPPORT) #define BUILTIN_DECOMPRESS #include #endif @@ -83,6 +83,7 @@ int tty = -1; /* * The following python code is not really used because ZLIBSUPPORT is only * defined if we have a built-in zlib, and the built-in zlib handles that. + * That is not true for android where we have zlib.h and not -lz. */ static const char zlibcode[] = "import sys, zlib; sys.stdout.write(zlib.decompress(sys.stdin.read()))";