commit 30968e3b6a405d5107cb9c02e4e9a5f3e722154b
Author: Paul Howarth <paul(a)city-fan.org>
Date: Mon Feb 28 14:37:48 2022 +0000
Applied the following patch from OpenSUSE: xv-3.10a-ticks.dif
More thorough version of CLK_TCK patch [Novell BZ #237214].
xv-3.10a-ticks.patch | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
---
diff --git a/xv-3.10a-ticks.patch b/xv-3.10a-ticks.patch
new file mode 100644
index 0000000..b7ccacf
--- /dev/null
+++ b/xv-3.10a-ticks.patch
@@ -0,0 +1,48 @@
+From 5a432144018ba3df6125b1956756a84c09f42c17 Mon Sep 17 00:00:00 2001
+From: Michael Adams <mdadams(a)ece.uvic.ca>
+Date: Sat, 19 Feb 2022 08:15:31 -0800
+Subject: [PATCH 6/6] Applied the following patch from OpenSUSE:
+ xv-3.10a-ticks.dif
+
+---
+ src/xvevent.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/src/xvevent.c b/src/xvevent.c
+index 13cdf47..48a1f0d 100644
+--- a/src/xvevent.c
++++ b/src/xvevent.c
+@@ -89,6 +89,7 @@ int EventLoop()
+ #ifdef USE_TICKS
+ clock_t waitsec_ticks=0L, orgtime_ticks=0L, curtime_ticks;
+ clock_t elapsed_ticks=0L, remaining_interval;
++ clock_t clock_ticks = sysconf(_SC_CLK_TCK);
+ #else
+ time_t orgtime=0L, curtime;
+ #endif
+@@ -135,7 +136,7 @@ int EventLoop()
+ all pending events (ie, drawing the image the first time)
+ have been dealt with: START WAITING */
+ #ifdef USE_TICKS
+- waitsec_ticks = (clock_t)(waitsec * CLK_TCK);
++ waitsec_ticks = (clock_t)(waitsec * clock_ticks);
+ orgtime_ticks = times(NULL); /* unclear if NULL valid, but OK on Linux */
+ #else
+ orgtime = time(NULL);
+@@ -181,11 +182,11 @@ int EventLoop()
+ } else
+ elapsed_ticks = curtime_ticks - orgtime_ticks;
+ remaining_interval = waitsec_ticks - elapsed_ticks;
+- if (remaining_interval >= (clock_t)(1 * CLK_TCK))
++ if (remaining_interval >= (clock_t)(1 * clock_ticks))
+ sleep(1);
+ else {
+ /* less than one second remaining: do delay in msec, then return */
+- Timer((remaining_interval * 1000L) / CLK_TCK); /* can't overflow */
++ Timer((remaining_interval * 1000L) / clock_ticks); /* can't overflow */
+ return waitloop? NEXTLOOP : NEXTQUIT;
+ }
+ #else
+--
+2.35.1
+
Show replies by date