0001-fix-compilation-without-zlib.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. From 1670ca128118be1d914fc89223e94c4cff1bbf03 Mon Sep 17 00:00:00 2001
  2. From: Jan Heylen <jan.heylen@nokia.com>
  3. Date: Wed, 25 Oct 2017 06:45:49 +0200
  4. Subject: [PATCH] Fix compilation without zlib
  5. libtelnet source code uses '#if defived(HAVE_ZLIB)' as conditional flag for
  6. optional compression support. But the configure(.ac) script does not play well
  7. with this: it will define 'HAVE_ZLIB' to either 1 (zlib present) or 0
  8. (zlib not present). For the C preprocessor, both cases mean 'defined'.
  9. As a result, compilation will fail when trying to include zlib.h, which is
  10. missing.
  11. Signed-off-by: Jan Heylen <jan.heylen@nokia.com>
  12. Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
  13. ---
  14. configure.ac | 2 +-
  15. 1 file changed, 1 insertion(+), 1 deletion(-)
  16. Upstream-status: upstream has changed to cmake iso autotools (but not yet
  17. released) [1] and a pull request exists to fix several issues with that,
  18. including correct handling of zlib detection [2].
  19. [1] https://github.com/seanmiddleditch/libtelnet/commit/4860d10da44929554895c0ef83274f38de68e958
  20. [2] https://github.com/seanmiddleditch/libtelnet/pull/54
  21. diff --git a/configure.ac b/configure.ac
  22. index 021b48f..c4dac8b 100644
  23. --- a/configure.ac
  24. +++ b/configure.ac
  25. @@ -33,7 +33,7 @@ AC_HEADER_STDC
  26. PKG_CHECK_MODULES([zlib],
  27. [zlib],
  28. [AC_DEFINE([HAVE_ZLIB], [1], [Define to 1 if you have zlib.])],
  29. - [AC_DEFINE([HAVE_ZLIB], [0], [Define to 1 if you have zlib.])])
  30. + [AC_MSG_NOTICE([not enabling zlib support])])
  31. # Checks for header files.
  32. --
  33. 2.7.4