From aeeabefbe5d2a06e0a22cdce4e40b80af6ed1cc6 Mon Sep 17 00:00:00 2001 From: KO Myung-Hun Date: Wed, 6 May 2015 16:09:17 +0900 Subject: [PATCH] Do not define getrusage() stuffs on OS/2 kLIBC OS/2 kLIBC has only a declaration of getrusage() without implementation. Due to this, definition of getrusage() stuffs causes compilation to fail. ----- In file included from lalloc.c:21: sh.h:379: error: conflicting types for `getrusage' f:/lang/gcc/usr/include/sys/resource.h:168: error: previous declaration of `getrusage' ----- --- sh.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sh.h b/sh.h index d5de277..b1def24 100644 --- a/sh.h +++ b/sh.h @@ -253,7 +253,8 @@ typedef MKSH_TYPEDEF_SSIZE_T ssize_t; /* extra types */ -#if !HAVE_GETRUSAGE +/* OS/2 kLIBC has only a declaration of getrusage() without implementation */ +#if !HAVE_GETRUSAGE && !defined(__OS2__) #undef rusage #undef RUSAGE_SELF #undef RUSAGE_CHILDREN