summaryrefslogtreecommitdiff
path: root/freefilesync/ffs_no_gcc12.patch
diff options
context:
space:
mode:
Diffstat (limited to 'freefilesync/ffs_no_gcc12.patch')
-rw-r--r--freefilesync/ffs_no_gcc12.patch63
1 files changed, 63 insertions, 0 deletions
diff --git a/freefilesync/ffs_no_gcc12.patch b/freefilesync/ffs_no_gcc12.patch
new file mode 100644
index 0000000..b25edac
--- /dev/null
+++ b/freefilesync/ffs_no_gcc12.patch
@@ -0,0 +1,63 @@
+Message: Because we do not use gcc 12, we have an error with unordered_map and std::pair.
+Author: zensubz
+Date-Modified: 2022-06-27
+Version: 11.22
+Source: https://freefilesync.org/forum/viewtopic.php?t=9376&p=34044#p34044
+Distro: any distro with g++ < 12
+--- a/FreeFileSync/Source/base/db_file.cpp
++++ b/FreeFileSync/Source/base/db_file.cpp
+@@ -642,7 +642,7 @@
+
+ void process(const ContainerObject::FolderList& currentFolders, const Zstring& parentRelPath, InSyncFolder::FolderList& dbFolders)
+ {
+- std::unordered_map<ZstringNorm, const FolderPair*> toPreserve;
++ std::map<ZstringNorm, const FolderPair*> toPreserve;
+
+ for (const FolderPair& folder : currentFolders)
+ if (!folder.isPairEmpty())
+--- a/FreeFileSync/Source/base/db_file.h
++++ b/FreeFileSync/Source/base/db_file.h
+@@ -67,9 +67,9 @@
+ InSyncStatus status = DIR_STATUS_STRAW_MAN;
+
+ //------------------------------------------------------------------
+- using FolderList = std::unordered_map<ZstringNorm, InSyncFolder >; //
+- using FileList = std::unordered_map<ZstringNorm, InSyncFile >; // key: file name (ignoring Unicode normal forms)
+- using SymlinkList = std::unordered_map<ZstringNorm, InSyncSymlink>; //
++ using FolderList = std::map<ZstringNorm, InSyncFolder >; //
++ using FileList = std::map<ZstringNorm, InSyncFile >; // key: file name (ignoring Unicode normal forms)
++ using SymlinkList = std::map<ZstringNorm, InSyncSymlink>; //
+ //------------------------------------------------------------------
+
+ FolderList folders;
+--- a/FreeFileSync/Source/base/file_hierarchy.h
++++ b/FreeFileSync/Source/base/file_hierarchy.h
+@@ -7,12 +7,14 @@
+ #ifndef FILE_HIERARCHY_H_257235289645296
+ #define FILE_HIERARCHY_H_257235289645296
+
++#include <map>
+ #include <string>
+ #include <memory>
+ #include <list>
+ #include <functional>
+ #include <unordered_set>
+-#include <unordered_map>
++#include <zen/zstring.h>
++#include <zen/stl_tools.h>
+ #include "structures.h"
+ #include "path_filter.h"
+ #include "../afs/abstract.h"
+@@ -94,9 +96,9 @@
+ //------------------------------------------------------------------
+ //key: raw file name, without any (Unicode) normalization, preserving original upper-/lower-case
+ //"Changing data [...] to NFC would cause interoperability problems. Always leave data as it is."
+- using FolderList = std::unordered_map<Zstring, std::pair<FolderAttributes, FolderContainer>>;
+- using FileList = std::unordered_map<Zstring, FileAttributes>;
+- using SymlinkList = std::unordered_map<Zstring, LinkAttributes>;
++ using FolderList = std::map<Zstring, std::pair<FolderAttributes, FolderContainer>>;
++ using FileList = std::map<Zstring, FileAttributes>;
++ using SymlinkList = std::map<Zstring, LinkAttributes>;
+ //------------------------------------------------------------------
+
+ FolderContainer() = default;
bgstack15