Index: libjava/java/lang/natRuntime.cc =================================================================== --- libjava/java/lang/natRuntime.cc (revision 203508) +++ libjava/java/lang/natRuntime.cc (working copy) @@ -48,6 +48,10 @@ #include #endif +#ifdef HAVE_UNISTD_H +#include +#endif + #ifdef USE_LTDL @@ -303,8 +307,15 @@ jint java::lang::Runtime::availableProcessors (void) { - // FIXME: find the real value. - return 1; + long procs = -1; + +#ifdef HAVE_UNISTD_H + procs = sysconf(_SC_NPROCESSORS_ONLN); +#endif + + if (procs == -1) + return 1; + return (jint) procs; } jstring