[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Fix zlib check on RHEL5



I attached here a very small patch to fix the zlib check on RedHat Enterprise Linux 5. For some reason zlib.h does not define ZLIB_VER_MAJOR and ZLIB_VER_MINOR.


--
Davíð Steinn Geirsson
Basis ehf.
david (at) basis.is / (+354) 575-0419
--- hobbit-trunk/build/test-zlib.c	2008-08-28 10:52:41.000000000 +0000
+++ hobbit-changed/build/test-zlib.c	2008-08-28 10:50:02.000000000 +0000
@@ -17,7 +17,12 @@
 	}
 	else {
 		printf("zlib version %s\n", zlibVersion());
+#ifdef ZLIB_VER_MINOR
 		if ((ZLIB_VER_MAJOR < 1) || ((ZLIB_VER_MAJOR == 1) && (ZLIB_VER_MINOR < 2))) {
+#else /* RedHat ? */
+		if (ZLIB_VERNUM < 0x1200) {
+#endif
+
 			printf("Your zlib version is too old, requires version 1.2.x or later\n");
 			return 1;
 		}