summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-04-12 11:14:42 -0400
committerNick Mathewson <nickm@torproject.org>2018-04-12 11:14:42 -0400
commit037fb0c804efda988c5c05f0384fccd426f807d0 (patch)
tree47ad7dc1b097c96f38aff8b7d5cb7b7848f5b8cb /src/common
parenta51630cc9af96642b05b9d0db345ea2d7d3ce128 (diff)
parent31508a0abccfee1cda0869a9a7d22df74d6b67b7 (diff)
downloadtor-037fb0c804efda988c5c05f0384fccd426f807d0.tar.gz
tor-037fb0c804efda988c5c05f0384fccd426f807d0.zip
Merge branch 'maint-0.3.3'
Diffstat (limited to 'src/common')
-rw-r--r--src/common/compat.c4
-rw-r--r--src/common/compat.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/common/compat.c b/src/common/compat.c
index 693fca70ea..6fdd6ecf00 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -3379,8 +3379,8 @@ get_total_system_memory_impl(void)
* Try to find out how much physical memory the system has. On success,
* return 0 and set *<b>mem_out</b> to that value. On failure, return -1.
*/
-int
-get_total_system_memory(size_t *mem_out)
+MOCK_IMPL(int,
+get_total_system_memory, (size_t *mem_out))
{
static size_t mem_cached=0;
uint64_t m = get_total_system_memory_impl();
diff --git a/src/common/compat.h b/src/common/compat.h
index 1bdff8db3d..c7e7f8d9ef 100644
--- a/src/common/compat.h
+++ b/src/common/compat.h
@@ -701,7 +701,7 @@ char *make_path_absolute(char *fname);
char **get_environment(void);
-int get_total_system_memory(size_t *mem_out);
+MOCK_DECL(int, get_total_system_memory, (size_t *mem_out));
int compute_num_cpus(void);