3 --- base/process_util.h.orig 2011-05-24 08:01:33.000000000 +0000
4 +++ base/process_util.h
9 -#elif defined(OS_MACOSX)
10 +#elif defined(OS_MACOSX) || defined(OS_BSD)
11 // kinfo_proc is defined in <sys/sysctl.h>, but this forward declaration
12 // is sufficient for the vector<kinfo_proc> below.
13 +#if defined(OS_NETBSD)
18 // malloc_zone_t is defined in <malloc/malloc.h>, but this forward declaration
19 // is sufficient for GetPurgeableZone() below.
20 typedef struct _malloc_zone_t malloc_zone_t;
21 +#if defined(OS_MACOSX)
22 #include <mach/mach.h>
24 #elif defined(OS_POSIX)
27 @@ -161,10 +167,11 @@ void CloseProcessHandle(ProcessHandle pr
28 // Win XP SP1 as well.
29 ProcessId GetProcId(ProcessHandle process);
31 -#if defined(OS_LINUX)
32 +#if defined(OS_LINUX) || defined(OS_BSD)
33 // Returns the path to the executable of the given process.
34 FilePath GetProcessExecutablePath(ProcessHandle process);
36 +#elif defined(OS_LINUX)
37 // Parse the data found in /proc/<pid>/stat and return the sum of the
38 // CPU-related ticks. Returns -1 on parse error.
39 // Exposed for testing.
40 @@ -439,8 +446,12 @@ class ProcessIterator {
43 bool started_iteration_;
44 -#elif defined(OS_MACOSX)
45 +#elif defined(OS_MACOSX) || defined(OS_BSD)
46 +#if defined(OS_NETBSD)
47 + std::vector<kinfo_proc2> kinfo_procs_;
49 std::vector<kinfo_proc> kinfo_procs_;
51 size_t index_of_kinfo_proc_;
52 #elif defined(OS_POSIX)