Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37704550
en ru br
Репозитории ALT
S:1.9.5-alt1
5.1: 1.5.2-alt7
4.1: 1.3.1-alt6
4.0: 1.3.1-alt6
3.0: 1.2.4-alt1
www.altlinux.org/Changes

Группа :: Система/Ядро и оборудование
Пакет: fuse-encfs

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: 0001-boost-serialization-version-workaround.patch
Скачать


From 37e22a7215e7cd68aa5ee49a996bbed302b7c25e Mon Sep 17 00:00:00 2001
From: Vladislav Zavjalov <slazav@altlinux.org>
Date: Fri, 12 Mar 2010 03:44:21 +0300
Subject: [PATCH] boost::serialization::version workaround
---
 fuse-encfs/encfs/FileUtils.cpp |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/fuse-encfs/encfs/FileUtils.cpp b/fuse-encfs/encfs/FileUtils.cpp
index 73a589f..9e69b57 100644
--- a/fuse-encfs/encfs/FileUtils.cpp
+++ b/fuse-encfs/encfs/FileUtils.cpp
@@ -131,6 +131,10 @@ namespace boost
         void save(Archive &ar, const EncFSConfig &cfg, 
                 unsigned int version)
         {
+	    //workaround: some boost versions wraps version to 65536!
+            //works for years 2006..2012
+	    if (version < 65536) version+=65536*306;
+
             (void)version;
             ar << make_nvp("creator", cfg.creator);
             ar << make_nvp("cipherAlg", cfg.cipherIface);
@@ -161,6 +165,10 @@ namespace boost
         template<class Archive>
         void load(Archive &ar, EncFSConfig &cfg, unsigned int version)
         {
+	    //workaround: some boost versions wraps version to 65536!
+            //works for years 2006..2012
+	    if (version < 65536) version+=65536*306;
+
             cfg.subVersion = version;
             ar >> make_nvp("creator", cfg.creator);
             ar >> make_nvp("cipherAlg", cfg.cipherIface);
@@ -207,12 +215,20 @@ namespace boost
         template<class Archive>
         void serialize(Archive &ar, EncFSConfig &cfg, unsigned int version)
         {
+	    //workaround: some boost versions wraps version to 65536!
+            //works for years 2006..2012
+	    if (version < 65536) version+=65536*306;
+
             split_free(ar, cfg, version);
         }
 
         template<class Archive>
-        void serialize(Archive &ar, Interface &i, const unsigned int version)
+        void serialize(Archive &ar, Interface &i, unsigned int version)
         {
+	    //workaround: some boost versions wraps version to 65536!
+            //works for years 2006..2012
+	    if (version < 65536) version+=65536*306;
+
             (void)version;
             ar & make_nvp("name", i.name());
             ar & make_nvp("major", i.current());
-- 
1.6.5.3
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin