OSDN Git Service

* java/lang/natObject.cc (is_mp): Protect use of _SC_NPROCESSORS_ONLN.
[pf3gnuchains/gcc-fork.git] / libjava / java / lang / natObject.cc
index adb487a..0404d2d 100644 (file)
@@ -436,8 +436,12 @@ typedef size_t obj_addr_t; /* Integer type big enough for object   */
 static bool
 is_mp()
 {
+#ifdef _SC_NPROCESSORS_ONLN
   long nprocs = sysconf(_SC_NPROCESSORS_ONLN);
   return (nprocs > 1);
+#else
+  return false;
+#endif
 }
 
 // A call to keep_live(p) forces p to be accessible to the GC