$OpenBSD: patch-base_process_util_linux_cc,v 1.2 2011/02/08 09:43:02 espie Exp $
--- base/process_util_linux.cc.orig	Tue Jan 25 12:41:05 2011
+++ base/process_util_linux.cc	Thu Feb  3 23:11:12 2011
@@ -440,6 +440,7 @@ bool ProcessMetrics::GetIOCounters(IoCounters* io_coun
 
 // Exposed for testing.
 int ParseProcStatCPU(const std::string& input) {
+#if !defined(OS_OPENBSD)
   // /proc/<pid>/stat contains the process name in parens.  In case the
   // process name itself contains parens, skip past them.
   std::string::size_type rparen = input.rfind(')');
@@ -458,11 +459,16 @@ int ParseProcStatCPU(const std::string& input) {
   base::StringToInt(fields[11], &fields11);
   base::StringToInt(fields[12], &fields12);
   return fields11 + fields12;
+#else
+  NOTIMPLEMENTED();
+  return -1;
+#endif
 }
 
 // Get the total CPU of a single process.  Return value is number of jiffies
 // on success or -1 on error.
 static int GetProcessCPU(pid_t pid) {
+#if defined(OS_LINUX)
   // Synchronously reading files in /proc is safe.
   base::ThreadRestrictions::ScopedAllowIO allow_io;
 
@@ -491,6 +497,10 @@ static int GetProcessCPU(pid_t pid) {
   closedir(dir);
 
   return total_cpu;
+#else
+  NOTIMPLEMENTED();
+  return -1;
+#endif
 }
 
 double ProcessMetrics::GetCPUUsage() {
@@ -601,7 +611,7 @@ void OnNoMemory() {
 }  // namespace
 
 extern "C" {
-#if !defined(USE_TCMALLOC)
+#if !defined(USE_TCMALLOC) && !defined(OS_OPENBSD)
 
 extern "C" {
 void* __libc_malloc(size_t size);
