From bd1779f8c66ee8afa41223c0135408fba17873a9 Mon Sep 17 00:00:00 2001 From: Dmitriy Musatkin Date: Sun, 29 Oct 2023 21:21:38 -0700 Subject: [PATCH] linux build fix --- source/posix/process.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/posix/process.c b/source/posix/process.c index b0133dfac..42bf7a240 100644 --- a/source/posix/process.c +++ b/source/posix/process.c @@ -13,6 +13,7 @@ #include #else #include +#include #include #endif @@ -83,9 +84,10 @@ int aws_memory_usage_init_for_current_process(struct aws_memory_usage_info *memo } memory_usage->maxrss = (size_t)info.resident_size_max; - memory_usage->rss = (size_t)info.resident_size; + memory_usage->rss = (size_t)info.resident_size; + #else - FILE* statm = aws_fopen_safe("/proc/self/statm", "r"); + FILE* statm = aws_fopen_safe(aws_string_new_from_c_str("/proc/self/statm"), 'r'); if (statm == NULL) { return aws_raise_error(AWS_ERROR_SYS_CALL_FAILURE); }