diff --git a/Telegram/build/docker/centos_env/Dockerfile b/Telegram/build/docker/centos_env/Dockerfile
index ab10d9fbb..9e2dd38b3 100644
--- a/Telegram/build/docker/centos_env/Dockerfile
+++ b/Telegram/build/docker/centos_env/Dockerfile
@@ -29,7 +29,7 @@ ENV LibrariesPath /usr/src/Libraries
 WORKDIR $LibrariesPath
 
 FROM builder AS patches
-RUN git clone $GIT/desktop-app/patches.git && cd patches && git checkout 3ffe48e
+RUN git clone $GIT/desktop-app/patches.git && cd patches && git checkout d58ce6b2b0
 
 FROM builder AS extra-cmake-modules
 
diff --git a/docs/building-mac.md b/docs/building-mac.md
index ec2594dd7..cd485cc83 100644
--- a/docs/building-mac.md
+++ b/docs/building-mac.md
@@ -29,7 +29,7 @@ Go to ***BuildPath*** and run
 
     git clone https://github.com/desktop-app/patches.git
     cd patches
-    git checkout 87a2e9ee07
+    git checkout d58ce6b2b0
     cd ../
     git clone https://chromium.googlesource.com/external/gyp
     git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
@@ -58,7 +58,7 @@ Go to ***BuildPath*** and run
 
     git clone https://github.com/desktop-app/patches.git
     cd patches
-    git checkout 87a2e9ee07
+    git checkout d58ce6b2b0
     cd ..
 
     git clone https://git.tukaani.org/xz.git
diff --git a/docs/building-win-x64.md b/docs/building-win-x64.md
index 5692ff761..5073fefff 100644
--- a/docs/building-win-x64.md
+++ b/docs/building-win-x64.md
@@ -34,7 +34,7 @@ Open **x64 Native Tools Command Prompt for VS 2019.bat**, go to ***BuildPath***
     cd ThirdParty
     git clone https://github.com/desktop-app/patches.git
     cd patches
-    git checkout 87a2e9ee07
+    git checkout d58ce6b2b0
     cd ../
     git clone https://chromium.googlesource.com/external/gyp
     cd gyp
@@ -65,7 +65,7 @@ Open **x64 Native Tools Command Prompt for VS 2019.bat**, go to ***BuildPath***
 
     git clone https://github.com/desktop-app/patches.git
     cd patches
-    git checkout 87a2e9ee07
+    git checkout d58ce6b2b0
     cd ..
 
     git clone https://github.com/desktop-app/lzma.git
diff --git a/docs/building-win.md b/docs/building-win.md
index 8772ff964..64b8e1e64 100644
--- a/docs/building-win.md
+++ b/docs/building-win.md
@@ -34,7 +34,7 @@ Open **x86 Native Tools Command Prompt for VS 2019.bat**, go to ***BuildPath***
     cd ThirdParty
     git clone https://github.com/desktop-app/patches.git
     cd patches
-    git checkout 87a2e9ee07
+    git checkout d58ce6b2b0
     cd ..
 
     git clone https://chromium.googlesource.com/external/gyp
@@ -68,7 +68,7 @@ Open **x86 Native Tools Command Prompt for VS 2019.bat**, go to ***BuildPath***
 
     git clone https://github.com/desktop-app/patches.git
     cd patches
-    git checkout 87a2e9ee07
+    git checkout d58ce6b2b0
     cd ..
 
     git clone https://github.com/desktop-app/lzma.git