diff options
author | infirit <[email protected]> | 2014-12-19 01:08:47 +0100 |
---|---|---|
committer | infirit <[email protected]> | 2014-12-19 01:08:47 +0100 |
commit | e55735b613afe7af55a4e25fa92aadf9fb804294 (patch) | |
tree | 29ca70b4564265e14fcd7670132803d83974e069 | |
parent | 0517ae4843573aeebefd1ae229c703906eb21b4e (diff) | |
download | mate-system-monitor-e55735b613afe7af55a4e25fa92aadf9fb804294.tar.bz2 mate-system-monitor-e55735b613afe7af55a4e25fa92aadf9fb804294.tar.xz |
OpenBSD: use G_N_ELEMENTS instead of nitems
nitems is never guaranteed to be defined in sys/params.h as it is meant
to be defined within a protected ifdef __KERNEL conditional.
Use G_N_ELEMENTS from GLib which is the proper way of doing this.
Taken from GSM commit: a9972b6a45b490fd316a1a536115baca465e3ae6
From: Antoine Jacoutot <[email protected]>
-rw-r--r-- | src/procproperties.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/procproperties.cpp b/src/procproperties.cpp index b378dc6..b8af0d1 100644 --- a/src/procproperties.cpp +++ b/src/procproperties.cpp @@ -120,7 +120,7 @@ fill_proc_properties (GtkWidget *tree, ProcInfo *info) int HZ; int mib[] = { CTL_KERN, KERN_CLOCKRATE }; - if (sysctl (mib, nitems(mib), &cinf, &size, NULL, 0) == -1) + if (sysctl (mib, G_N_ELEMENTS (mib), &cinf, &size, NULL, 0) == -1) HZ = 100; else HZ = cinf.hz; |