From 90d63741636b88d9fd84a281d99eb6c87fcf193e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Sun, 26 Mar 2017 19:42:22 +0200
Subject: rusage Haiku patch


diff --git a/liboctave/wrappers/time-wrappers.c b/liboctave/wrappers/time-wrappers.c
index 5bc8c89..99c9452 100644
--- a/liboctave/wrappers/time-wrappers.c
+++ b/liboctave/wrappers/time-wrappers.c
@@ -128,6 +128,7 @@ octave_getrusage_wrapper (time_t *usr_sec, time_t *sys_sec,
       *sys_sec = ru.ru_stime.tv_sec;
       *sys_usec = ru.ru_stime.tv_usec;
 
+#ifndef __HAIKU__
       *maxrss = ru.ru_maxrss;
       *ixrss = ru.ru_ixrss;
       *idrss = ru.ru_idrss;
@@ -142,6 +143,22 @@ octave_getrusage_wrapper (time_t *usr_sec, time_t *sys_sec,
       *nsignals = ru.ru_nsignals;
       *nvcsw = ru.ru_nvcsw;
       *nivcsw = ru.ru_nivcsw;
+#else
+      *maxrss = 0;
+      *ixrss = 0;
+      *idrss = 0;
+      *isrss = 0;
+      *minflt = 0;
+      *majflt = 0;
+      *nswap = 0;
+      *inblock = 0;
+      *oublock = 0;
+      *msgsnd = 0;
+      *msgrcv = 0;
+      *nsignals = 0;
+      *nvcsw = 0;
+      *nivcsw = 0;
+#endif
     }
 
   return status;
-- 
2.11.0

