tags 436497 + patch thanks Hi,
Attached is the diff for my newt 0.52.2-11.3 NMU. -- see shy jo
diff -u newt-0.52.2/debian/changelog newt-0.52.2/debian/changelog
--- newt-0.52.2/debian/changelog
+++ newt-0.52.2/debian/changelog
@@ -1,3 +1,11 @@
+newt (0.52.2-11.3) unstable; urgency=low
+
+ * NMU
+ * Cherry-pick upstream patch to avoid breaking timers when the system
+ clock jumps backwards. Closes: #436497
+
+ -- Joey Hess <[EMAIL PROTECTED]> Fri, 11 Jul 2008 14:48:49 -0400
+
newt (0.52.2-11.2) unstable; urgency=low
* Non-maintainer upload.
only in patch2:
unchanged:
--- newt-0.52.2.orig/debian/patches/500_cope_with_backward_system_time_jumps.patch
+++ newt-0.52.2/debian/patches/500_cope_with_backward_system_time_jumps.patch
@@ -0,0 +1,28 @@
+diff -ur newt-0.52.2~/form.c newt-0.52.2/form.c
+--- newt-0.52.2~/form.c 2005-09-21 05:32:01.000000000 -0400
++++ newt-0.52.2/form.c 2008-07-11 14:47:54.000000000 -0400
+@@ -943,16 +943,19 @@
+ if (form->timer) {
+ /* Calculate when we next need to return with a timeout. Do
+ this inside the loop in case a callback resets the timer. */
+- if (!form->lastTimeout.tv_sec && !form->lastTimeout.tv_usec)
+- gettimeofday(&form->lastTimeout, NULL);
++ gettimeofday(&now, 0);
++
++ if ((!form->lastTimeout.tv_sec && !form->lastTimeout.tv_usec) ||
++ now.tv_sec < form->lastTimeout.tv_sec ||
++ (now.tv_sec == form->lastTimeout.tv_sec &&
++ now.tv_usec < form->lastTimeout.tv_usec))
++ form->lastTimeout = now;
+
+ nextTimeout.tv_sec = form->lastTimeout.tv_sec +
+ (form->timer / 1000);
+ nextTimeout.tv_usec = form->lastTimeout.tv_usec +
+ (form->timer % 1000) * 1000;
+
+- gettimeofday(&now, 0);
+-
+ if (now.tv_sec > nextTimeout.tv_sec) {
+ timeout.tv_sec = timeout.tv_usec = 0;
+ } else if (now.tv_sec == nextTimeout.tv_sec) {
+Only in newt-0.52.2: form.c.orig
signature.asc
Description: Digital signature

