Commit da275cbd authored by Nirbheek Chauhan's avatar Nirbheek Chauhan 🐜
Browse files

zlib.recipe: config.h defines can be 1 or 0 too

Part-of: <gstreamer/cerbero!497>
parent 84686083
......@@ -10,9 +10,12 @@ class Recipe(recipe.Recipe):
url = 'https://zlib.net/fossils/zlib-%(version)s.tar.gz'
tarball_checksum = 'c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1'
licenses = [{License.BSD_like: ['README']}]
patches = ['zlib/0001-win32-fix-dll-name.patch',
'zlib/0001-Fix-test-builds-to-use-the-built-libz-headers-librar.patch',
'zlib/0001-Add-a-meson-port.patch']
patches = [
'zlib/0001-win32-fix-dll-name.patch',
'zlib/0001-Fix-test-builds-to-use-the-built-libz-headers-librar.patch',
'zlib/0001-Add-a-meson-port.patch',
'zlib/0001-zconf.h-Check-that-HAVE_UNISTD_H-is-not-0.patch',
]
files_libs = ['libz']
files_devel = ['include/zlib.h', 'include/zconf.h', 'lib/pkgconfig/zlib.pc']
......
From 2fe4c96e72c3c23c9545d4ff6ec493fddb210889 Mon Sep 17 00:00:00 2001
From: Cerbero Build System <cerbero@gstreamer.freedesktop.org>
Date: Mon, 8 Jun 2020 09:56:46 +0530
Subject: [PATCH] zconf.h: Check that HAVE_UNISTD_H is not 0
Also do the same check for HAVE_STDARG_H. Some projects such as ffmpeg
will use 1/0 to denote presence/absence instead of define/undef.
---
zconf.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/zconf.h b/zconf.h
index 5e1d68a..d4b49da 100644
--- a/zconf.h
+++ b/zconf.h
@@ -431,11 +431,11 @@ typedef uLong FAR uLongf;
typedef unsigned long z_crc_t;
#endif
-#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
+#if defined(HAVE_UNISTD_H) && HAVE_UNISTD_H != 0 /* may be set to #if 1 by ./configure */
# define Z_HAVE_UNISTD_H
#endif
-#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */
+#if defined(HAVE_STDARG_H) && HAVE_STDARG_H != 0 /* may be set to #if 1 by ./configure */
# define Z_HAVE_STDARG_H
#endif
--
2.27.0.windows.1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment