Signed-off-by: Nicolas Morey-Chaisemartin <nmo...@kalray.eu>
---
 test/common_plat/performance/odp_crypto.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/test/common_plat/performance/odp_crypto.c 
b/test/common_plat/performance/odp_crypto.c
index 49a9f4b..5d74072 100644
--- a/test/common_plat/performance/odp_crypto.c
+++ b/test/common_plat/performance/odp_crypto.c
@@ -271,8 +271,13 @@ static void
 fill_time_record(time_record_t *rec)
 {
        gettimeofday(&rec->tv, NULL);
+#ifdef HAVE_GETRUSAGE
        getrusage(RUSAGE_SELF, &rec->ru_self);
        getrusage(RUSAGE_THREAD, &rec->ru_thread);
+#else
+       memset(&rec->ru_self, 0, sizeof(struct rusage));
+       memset(&rec->ru_thread, 0, sizeof(struct rusage));
+#endif
 }
 
 /**
-- 
2.10.1.4.g0ffc436


Reply via email to