aboutsummaryrefslogtreecommitdiff
path: root/src/common/CMakeLists.txt
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-10-26 10:16:48 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-11-27 22:15:34 +0000
commit000666ff784185583c76f33bf0882a08fd9c29f2 (patch)
tree47566d1e726380beb28f6823db327f4cb12562ff /src/common/CMakeLists.txt
parentMerge pull request #2827 (diff)
downloadmonero-000666ff784185583c76f33bf0882a08fd9c29f2.tar.xz
add a memwipe function
It's meant to avoid being optimized out memory_cleanse lifted from bitcoin
Diffstat (limited to '')
-rw-r--r--src/common/CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 50887e35c..7ad08ea83 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -35,6 +35,7 @@ set(common_sources
download.cpp
util.cpp
i18n.cpp
+ memwipe.c
password.cpp
perf_timer.cpp
threadpool.cpp
@@ -63,6 +64,7 @@ set(common_private_headers
util.h
varint.h
i18n.h
+ memwipe.h
password.h
perf_timer.h
stack_trace.h
@@ -90,5 +92,9 @@ target_link_libraries(common
${OPENSSL_LIBRARIES}
${EXTRA_LIBRARIES})
+if(HAVE_C11)
+SET_PROPERTY(SOURCE memwipe.c PROPERTY COMPILE_FLAGS -std=c11)
+endif()
+
#monero_install_headers(common
# ${common_headers})