ports/sysutils/mate-system-monitor/files/patch-src_load-graph.cpp
Koop Mast a236e2d0bf Say hello to Mate 1.6.
Mate is a lite desktop forked from gnome2.

Most of the work is done by Jeremy Messenger (mezz@). The only thing I did
was update a few ports to later 1.6 release and attempting to keep up with
ports infra changes. Resulting bugs are all mine.

Mate is a sort of replacement for Gnome 2. So people wanting to keep a
Gnome 2 like desktop should switch. Gnome 2 will be replaced by Gnome 3
in the near future. This switch will be announce with a transition time
so people have more time to switch if they haven't already.

This release was made possible by everyone that send friendly pokes to
keep mate on my mind.

Approved by:	portmgr (bapt)
2013-11-23 11:39:07 +00:00

11 lines
525 B
C++

--- src/load-graph.cpp.orig 2008-01-14 23:43:43.000000000 -0600
+++ src/load-graph.cpp 2008-01-14 23:44:15.000000000 -0600
@@ -412,7 +412,7 @@
// e.g: ceil(100.5 KiB) = 101 KiB = 101 * 2**(1 * 10)
// where base10 = 1, coef10 = 101, pow2 = 16
- unsigned pow2 = std::floor(log2(new_max));
+ unsigned pow2 = std::floor(log(new_max) / log(2));
unsigned base10 = pow2 / 10;
unsigned coef10 = std::ceil(new_max / double(1UL << (base10 * 10)));
g_assert(new_max <= (coef10 * (1UL << (base10 * 10))));