fix busybox brctl rejecting 0 as a valid value in time-related commands (setageing...
authorNicolas Thill <nico@openwrt.org>
Sun, 9 Nov 2008 22:38:59 +0000 (22:38 +0000)
committerNicolas Thill <nico@openwrt.org>
Sun, 9 Nov 2008 22:38:59 +0000 (22:38 +0000)
SVN-Revision: 13163

package/busybox/patches/801-brctl_zero_time.patch [new file with mode: 0644]

diff --git a/package/busybox/patches/801-brctl_zero_time.patch b/package/busybox/patches/801-brctl_zero_time.patch
new file mode 100644 (file)
index 0000000..e083f9f
--- /dev/null
@@ -0,0 +1,13 @@
+--- a/networking/brctl.c
++++ b/networking/brctl.c
+@@ -34,8 +34,9 @@ static ALWAYS_INLINE void strtotimeval(s
+ {
+       double secs;
+ #if BRCTL_USE_INTERNAL
++      errno = 0;
+       secs = /*bb_*/strtod(time_str, NULL);
+-      if (!secs)
++      if (errno)
+ #else
+       if (sscanf(time_str, "%lf", &secs) != 1)
+ #endif