| diff --git a/frontend/main.c b/frontend/main.c |
| --- a/frontend/main.c |
| +++ b/frontend/main.c |
| @@ -43,7 +43,7 @@ |
| #endif |
| |
| /* the BSD derivatives don't define __unix__ */ |
| -#if defined(__APPLE__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) |
| +#if defined(__APPLE__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__bsdi__) || defined(__native_client__) |
| #define __unix__ |
| #endif |
| |
| @@ -1048,14 +1048,14 @@ int main(int argc, char *argv[]) |
| if ((showcnt <= 0) || !bytesWritten) |
| { |
| double timeused; |
| -#ifdef __unix__ |
| +#if defined(__unix__) && defined(HAVE_GETRUSAGE) |
| struct rusage usage; |
| #endif |
| #ifdef _WIN32 |
| char percent[MAX_PATH + 20]; |
| timeused = (GetTickCount() - begin) * 1e-3; |
| #else |
| -#ifdef __unix__ |
| +#if defined(__unix__) && defined(HAVE_GETRUSAGE) |
| if (getrusage(RUSAGE_SELF, &usage) == 0) { |
| timeused = (double)usage.ru_utime.tv_sec + |
| (double)usage.ru_utime.tv_usec * 1e-6; |