mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-13 07:10:05 +02:00
29 lines
702 B
Plaintext
29 lines
702 B
Plaintext
From d20829d750f2f6dcdab2586938e1af52f3030b21 Mon Sep 17 00:00:00 2001
|
|
From: Jerome Duval <jerome.duval@gmail.com>
|
|
Date: Tue, 20 Oct 2020 18:10:27 +0200
|
|
Subject: rusage is incomplete
|
|
|
|
|
|
diff --git a/apps/json_parse.c b/apps/json_parse.c
|
|
index bba4622..706a6b3 100644
|
|
--- a/apps/json_parse.c
|
|
+++ b/apps/json_parse.c
|
|
@@ -38,12 +38,14 @@ static int showobj(struct json_object *new_obj);
|
|
|
|
static void showmem(void)
|
|
{
|
|
+#ifndef __HAIKU__
|
|
#ifdef HAVE_GETRUSAGE
|
|
struct rusage rusage;
|
|
memset(&rusage, 0, sizeof(rusage));
|
|
getrusage(RUSAGE_SELF, &rusage);
|
|
printf("maxrss: %ld KB\n", rusage.ru_maxrss);
|
|
#endif
|
|
+#endif
|
|
}
|
|
|
|
static int parseit(int fd, int (*callback)(struct json_object *))
|
|
--
|
|
2.28.0
|
|
|