SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
16
benchmarks/netperf/patches/patch-src_netcpu_sysctl_c
Normal file
16
benchmarks/netperf/patches/patch-src_netcpu_sysctl_c
Normal file
|
@ -0,0 +1,16 @@
|
|||
--- src/netcpu_sysctl.c.orig Thu Apr 18 17:35:34 2013
|
||||
+++ src/netcpu_sysctl.c Thu Apr 18 17:41:12 2013
|
||||
@@ -85,8 +85,12 @@ static void
|
||||
get_cpu_time(CP_TIME_TYPE *cpu_time)
|
||||
{
|
||||
size_t cpu_time_len = CPUSTATES * sizeof (cpu_time[0]);
|
||||
+ int mib[2];
|
||||
|
||||
- if (sysctlbyname("kern.cp_time", cpu_time, &cpu_time_len, NULL, 0) == -1) {
|
||||
+ mib[0] = CTL_KERN;
|
||||
+ mib[1] = KERN_CPTIME;
|
||||
+
|
||||
+ if (sysctl(mib, 2, cpu_time, &cpu_time_len, NULL, 0) == -1) {
|
||||
fprintf (stderr, "Cannot get CPU time!\n");
|
||||
exit (1);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue