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'
-----
This commit is contained in:
KO Myung-Hun 2015-05-06 16:09:17 +09:00
parent a4139c6666
commit aeeabefbe5

3
sh.h
View File

@ -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