[packages/urt] - fix for sizeof(time_t) != sizeof(long), e.g. x32

qboosh qboosh at pld-linux.org
Sat Oct 4 09:59:26 CEST 2025


commit 0e038fa8e3394dd7e711c9a68d05af86ba7a613b
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Oct 4 10:02:36 2025 +0200

    - fix for sizeof(time_t) != sizeof(long), e.g. x32

 urt-types.patch | 23 +++++++++++++++++++++++
 urt.spec        |  2 ++
 2 files changed, 25 insertions(+)
---
diff --git a/urt.spec b/urt.spec
index dd885a3..c450fe3 100644
--- a/urt.spec
+++ b/urt.spec
@@ -13,6 +13,7 @@ Patch1:		%{name}-fixes.patch
 Patch2:		%{name}-DESTDIR.patch
 Patch3:		%{name}-shared.patch
 Patch4:		%{name}-c.patch
+Patch5:		%{name}-types.patch
 URL:		https://www2.cs.utah.edu/gdc/projects/urt/
 BuildRequires:	%{__perl}
 BuildRequires:	libtiff-devel
@@ -92,6 +93,7 @@ Statyczna biblioteka Utah Raster Toolkit.
 %patch -P2 -p1
 %patch -P3 -p1
 %patch -P4 -p1
+%patch -P5 -p1
 
 %build
 %{__mv} config/urt config/urt.old
diff --git a/urt-types.patch b/urt-types.patch
new file mode 100644
index 0000000..19d62b7
--- /dev/null
+++ b/urt-types.patch
@@ -0,0 +1,23 @@
+--- urt-3.1b/tools/rlenoise.c.orig	2025-10-04 09:54:14.424558691 +0200
++++ urt-3.1b/tools/rlenoise.c	2025-10-04 09:57:27.732349020 +0200
+@@ -48,16 +48,16 @@ char ** argv;
+ #ifdef USE_RANDOM
+     /* Use the BSD random() function */
+     {
+-	long seed;
++	time_t seed;
+ 	(void)time( &seed );
+-	srandom( *(int *)&seed );
++	srandom( (int)seed );
+     }
+ #else
+     /* use the standard Unix rand function if nothing better */
+     {
+-	long seed;
++	time_t seed;
+ 	(void)time( &seed );
+-	srand( *(int *)&seed );
++	srand( (int)seed );
+     }
+ #define random rand
+ #endif
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/urt.git/commitdiff/0e038fa8e3394dd7e711c9a68d05af86ba7a613b



More information about the pld-cvs-commit mailing list