summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-02-18 10:25:23 +0000
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2020-02-18 10:29:43 +0000
commita3ae1b0ac2db92d869a9f414532cd425ac2e09a7 (patch)
tree685de9a60ac3742dd0366b93c4170da7db6397a6 /meson.build
parent276eb5b0911965e1692a020a310dce0914d33c5d (diff)
downloadenlightenment-a3ae1b0ac2db92d869a9f414532cd425ac2e09a7.tar.gz
e auth - use our memclear and fill it out with modern zeroing methods
so memset_s still doesn't get detected (add a check anyway), but there are other alternatives, so detect and use them if found (explicit_bzero, explicit_memset) in addition to the generally "practically works" memset ptr method we had and.. just to be extra safe add an asm memory barrier to this fallback. also.. mlock the passwd memory in lokker (if it doesn't work - don't worry - there is nothing we can do, so we did our best) to avoid this memory gettign swapped etc.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build12
1 files changed, 12 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 3d53a720cc..e62aa3cb21 100644
--- a/meson.build
+++ b/meson.build
@@ -186,6 +186,18 @@ if cc.has_header('execinfo.h') == true
elif cc.has_function('backtrace_symbols_fd', dependencies: 'execinfo') == false
execinfo_dep = dependency('execinfo', required: false)
endif
+if cc.has_function('explicit_bzero') == true
+ config_h.set('HAVE_EXPLICIT_BZERO' , '1')
+endif
+if cc.has_function('explicit_memset') == true
+ config_h.set('HAVE_EXPLICIT_MEMSET' , '1')
+endif
+if cc.has_function('memset_s') == true
+ config_h.set('HAVE_MEMSET_S' , '1')
+endif
+if cc.has_function('mlock') == true
+ config_h.set('HAVE_MLOCK' , '1')
+endif
if cc.has_header('fnmatch.h') == false
error('fnmatch.h not found')