From 430086f79c2bc6c186c8ebbc3386714c58a25c5d Mon Sep 17 00:00:00 2001 From: Marcin Banasiak Date: Thu, 14 Feb 2013 22:32:33 +0100 Subject: [PATCH] Fix build with zlib >= 1.2.6 (patch from Fedora) --- partimage-gzFile.patch | 33 +++++++++++++++++++++++++++++++++ partimage.spec | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 partimage-gzFile.patch diff --git a/partimage-gzFile.patch b/partimage-gzFile.patch new file mode 100644 index 0000000..eaf791a --- /dev/null +++ b/partimage-gzFile.patch @@ -0,0 +1,33 @@ +diff -Naur partimage-0.6.9/src/client/imagefile.cpp partimage-0.6.9-new/src/client/imagefile.cpp +--- partimage-0.6.9/src/client/imagefile.cpp 2010-07-25 12:30:31.000000000 -0300 ++++ partimage-0.6.9-new/src/client/imagefile.cpp 2012-09-20 08:52:11.568839328 -0300 +@@ -783,7 +783,7 @@ + else if (m_options.dwCompression == COMPRESS_GZIP) // Gzip compression + { + showDebug(1, "open gzip\n"); +- m_gzImageFile = (gzFile *) gzdopen(m_nFdImage, "wb"); //"wb1h"); ++ m_gzImageFile = (gzFile) gzdopen(m_nFdImage, "wb"); //"wb1h"); + if (m_gzImageFile == NULL) + { + showDebug(1, "error:%d %s\n", errno, strerror(errno)); +@@ -1098,7 +1098,7 @@ + } + else if (m_options.dwCompression == COMPRESS_GZIP) // Gzip compression + { +- m_gzImageFile = (gzFile *) gzdopen(m_nFdImage, "rb"); ++ m_gzImageFile = (gzFile) gzdopen(m_nFdImage, "rb"); + if (m_gzImageFile == NULL) + THROW(ERR_ERRNO, errno); + else +diff -Naur partimage-0.6.9/src/client/imagefile.h partimage-0.6.9-new/src/client/imagefile.h +--- partimage-0.6.9/src/client/imagefile.h 2010-07-25 12:30:31.000000000 -0300 ++++ partimage-0.6.9-new/src/client/imagefile.h 2012-09-20 09:00:44.028620131 -0300 +@@ -41,7 +41,7 @@ + COptions m_options; + + FILE *m_fImageFile; +- gzFile *m_gzImageFile; ++ gzFile m_gzImageFile; + BZFILE *m_bzImageFile; + + int m_nFdImage; diff --git a/partimage.spec b/partimage.spec index becb110..9a37cc8 100644 --- a/partimage.spec +++ b/partimage.spec @@ -14,6 +14,7 @@ Source3: %{name}d.pam Source4: %{name}d-ssl.cnf Patch0: %{name}-fix_debug.patch Patch1: %{name}-descr.patch +Patch2: %{name}-gzFile.patch URL: http://www.partimage.org/ BuildRequires: automake BuildRequires: bzip2-devel @@ -104,6 +105,7 @@ Server dla Partimage. %setup -q %patch0 -p1 %patch1 -p1 +%patch2 -p1 %build cp -f /usr/share/automake/config.sub . -- 2.44.0