--- /dev/null
+From c90ae2ca3dff267b9e21595376d22de397f6f78f Mon Sep 17 00:00:00 2001
+From: Ryan Coe <bluemrp9@gmail.com>
+Date: Tue, 20 Aug 2019 06:22:43 -0700
+Subject: [PATCH] Fix build error with newer cmake
+
+Fixes the following build error:
+
+CMake Error at cmake/os/Linux.cmake:29 (STRING):
+STRING sub-command REPLACE requires at least four arguments.
+Call Stack (most recent call first):
+CMakeLists.txt:101 (INCLUDE)
+
+CMake Error at cmake/os/Linux.cmake:29 (STRING):
+STRING sub-command REPLACE requires at least four arguments.
+Call Stack (most recent call first):
+CMakeLists.txt:101 (INCLUDE)
+
+https://jira.mariadb.org/browse/MDEV-20596
+
+Signed-off-by: Ryan Coe <bluemrp9@gmail.com>
+---
+ cmake/os/Linux.cmake | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/cmake/os/Linux.cmake b/cmake/os/Linux.cmake
+index 50a2b21c838d8d6ca4cacc0704a9be4da3a57a0a..b871586acc9cfaddc3836cc9afafd85969120420 100644
+--- a/cmake/os/Linux.cmake
++++ b/cmake/os/Linux.cmake
+@@ -26,9 +26,9 @@ SET(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} -D_GNU_SOURCE=1)
+
+ # Fix CMake (< 2.8) flags. -rdynamic exports too many symbols.
+ FOREACH(LANG C CXX)
+- STRING(REPLACE "-rdynamic" ""
+- CMAKE_SHARED_LIBRARY_LINK_${LANG}_FLAGS
+- ${CMAKE_SHARED_LIBRARY_LINK_${LANG}_FLAGS}
++ STRING(REPLACE "-rdynamic" ""
++ "CMAKE_SHARED_LIBRARY_LINK_${LANG}_FLAGS"
++ "${CMAKE_SHARED_LIBRARY_LINK_${LANG}_FLAGS}"
+ )
+ ENDFOREACH()
+
+--
+2.17.1
+