Obsolete golang-120
[oi-userland.git] / components / library / libgtop / patches / libgtop-05-ncpu.patch
blobb6fc0deecd3ee1ca14f32433e67a0cac95fa6dc9
1 Fix for:
2 Bug 26223817 - gnome Settings-Details dumps core on SPARC in build 121
4 Makes size of cpu_stat_kstat array match the boundary check we use for it in
5 glibtop_get_kstats() in sysdeps/solaris/open.c. (64 was greater than the
6 previous GLIBTOP_NCPU size of 32, but upstream raised GLIBTOP_NCPU from 32
7 to 1024 in 2013 for libgtop 2.30 and the Solaris header wasn't kept in sync.)
9 Needs to be submitted upstream once we fix upstream to build on Solaris again.
11 --- libgtop-2.36.0/sysdeps/solaris/glibtop_machine.h
12 +++ libgtop-2.36.0/sysdeps/solaris/glibtop_machine.h
13 @@ -34,6 +34,11 @@
14 #include <kvm.h>
15 #include <sys/sysinfo.h>
17 +#include <glibtop/cpu.h>
18 +#ifndef GLIBTOP_NCPU
19 +#define GLIBTOP_NCPU 1024
20 +#endif
22 G_BEGIN_DECLS
24 struct _glibtop_machine
25 @@ -50,7 +55,7 @@ struct _glibtop_machine
26 hrtime_t vminfo_snaptime;
27 vminfo_t vminfo;
29 - kstat_t *cpu_stat_kstat [64];
30 + kstat_t *cpu_stat_kstat [GLIBTOP_NCPU];
32 kstat_t *system; /* boot_time & avenrun* where needed */
33 kstat_t *syspages; /* memory usage */