[backfire/packages] lcd4linux: add fix for 'log2l/log2f' issue (closes: #8897)
authorNicolas Thill <nico@openwrt.org>
Fri, 14 Oct 2011 10:56:36 +0000 (10:56 +0000)
committerNicolas Thill <nico@openwrt.org>
Fri, 14 Oct 2011 10:56:36 +0000 (10:56 +0000)
SVN-Revision: 28452

utils/lcd4linux/patches/170-log2f.patch [new file with mode: 0644]

diff --git a/utils/lcd4linux/patches/170-log2f.patch b/utils/lcd4linux/patches/170-log2f.patch
new file mode 100644 (file)
index 0000000..8f6d861
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/plugin_netinfo.c
++++ b/plugin_netinfo.c
+@@ -264,7 +264,7 @@ static void my_netmask_short(RESULT * re
+     sin = get_netmask(arg1);
+     if (NULL != sin) {
+       logval = (long double) (get_netmask(arg1)->sin_addr.s_addr);
+-      netlen = (int) rint(log2l(logval) / log2l(2.0));
++      netlen = (int) rint(log2f(logval) / log2f(2.0));
+       qprintf(value, sizeof(value), "/%d", netlen);
+     } else {
+       qprintf(value, sizeof(value), "/?");