From a8ffee6c1cc1875280cefc5712fecf839d6ff70c Mon Sep 17 00:00:00 2001 From: Dmitry Degtyarev Date: Thu, 23 Sep 2021 12:58:45 +0400 Subject: [PATCH] fix smbclient stack smashing on 32bit systems closes #294 --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c36c055..7e80f1a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,9 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) -add_compile_options(-Wall -Wshadow -Werror=switch) +# NOTE: neeed largefile options to prevent problems with +# smbclient on 32bit systems +add_compile_options(-Wall -Wshadow -Werror=switch -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64) # You can get version from spec by first finding Versions keyword. # After that you can use awk to split line by : and then select second part of it.