Browse Source

LibC: create a stub for getrusage.

Xiao NuoFu 5 năm trước cách đây
mục cha
commit
5fe521c507
1 tập tin đã thay đổi với 10 bổ sung0 xóa
  1. 10 0
      Libraries/LibC/ulimit.cpp

+ 10 - 0
Libraries/LibC/ulimit.cpp

@@ -26,6 +26,7 @@
 
 #include <assert.h>
 #include <ulimit.h>
+#include <sys/resource.h>
 
 extern "C" {
 
@@ -36,4 +37,13 @@ long ulimit(int cmd, long newlimit)
     ASSERT_NOT_REACHED();
     return -1;
 }
+
+int getrusage(int who, struct rusage *usage)
+{
+    (void)who;
+    (void)usage;
+    ASSERT_NOT_REACHED();
+    return -1;
+}
+
 }