XPost: linux.debian.bugs.dist
From:
[email protected]
--BDzH44KJ+fWIkzlb
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Mon, Dec 23, 2024 at 06:33:56PM +0100, Lucas Nussbaum wrote:
Source: yagiuda
Version: 1.19-11
Severity: serious
Justification: FTBFS
Tags: trixie sid ftbfs
User: [email protected]
Usertags: ftbfs-20241223 ftbfs-trixie
random.c: In function ‘seedRNG’:
random.c:84:14: error: passing argument 1 of ‘time’ from incompatible pointer type [-Wincompatible-pointer-types]
84 | time(&seed_time); /* set seed_time to the number of seconds since Jan 1980 */
| ^~~~~~~~~~
| |
| long int *
In file included from /usr/include/features.h:510,
from /usr/include/arm-linux-gnueabihf/bits/libc-header-start.h:33,
from /usr/include/stdlib.h:26,
from random.c:2:
/usr/include/time.h:85:15: note: expected ‘time_t *’ {aka ‘long long int *’} but argument is of type ‘long int *’
85 | extern time_t __REDIRECT_NTH (time, (time_t *__timer), __time64);
| ^~~~~~~~~~~~~~
make[2]: *** [Makefile:615: random.o] Error 1
Attached is a patch that simplifies the seeding of srand48().
Dave, if you'd like, I can go ahead and prepare an updated package.
The only reason I didn't go ahead and do so is because I noticed that
a minor difference between what's in the source package in the archive
and what's in the Salsa repo, and I didn't want to create a 3-way merge
in case you have other work in progess.
I suspect there is one missing commit (plus the tag for debian/1.19-11)
that needs to be pushed to Salsa. Specifically, the source package
doesn't contain the file .gitignore, which appears was accidentally
added in commit 47224e3868f6e2e845a024b9343ed35d01195ec0. If you would
like to push your commit and the tag, please do. Otherwise, I'll use
the commit and tag created by `gbp import-dsc` for the -11 revision and
push that.
Thanks,
tony
--BDzH44KJ+fWIkzlb
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="long-int.patch"
Index: yagiuda/src/random.c ==================================================================--- yagiuda.orig/src/random.c
+++ yagiuda/src/random.c
@@ -79,10 +79,5 @@ int randint(void)
usually necessary to seed both sepparately */
void seedRNG(void)
{
- long seed_time;
-
- time(&seed_time); /* set seed_time to the number of seconds since Jan 1980 */
-
- srand48(seed_time); /* Seed the float type */
-
+ srand48((long)time(NULL)); /* Seed the float type */
}
--BDzH44KJ+fWIkzlb--
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEE5Qr9Va3SequXFjqLIdIFiZdLPpYFAmdqQKIACgkQIdIFiZdL PpYASBAAvFMwjTryf7CdSqm5m6rJqeBKwGxCcD2+13jdAFyi1O9sS1Qanv5IncSZ lAhfaiTp4jnLlqrQsepPbz2U0n02Gj8Q1slujr/4YWoJ3jjgVr0byGAo4U/+tLAd fYjFPQ7nKCw9mPGrgdKnAV7kTMhLpC1IgP2U6VamBMdMd9x124QqWw9rFpK8lYGb HcSzIRlse9/6PRON5ShgnCnp8zFlu38rlIoBQetOhWYI82fsrRC4XKSdWPs6aAEJ +4YQyN++UFoeVC8KtNNuWHCOyMvGuM97OL9xbc1sy3PJP7f1kM052NmVW2dj2Ltz Hv972q6X2TVhjHcgXEJLtlSdmLAwEV5PN/Sz9f//KypBZGLG4DLsiSX8Sf51nBdG qjnMQdXi9qfuXlYJ3MXMrUIPoRDAlqXdtvt44oMZ3N4EQNitivoV5Rt89x05ZdLg CGHEd1en/Mf9rMuh2aU7Xg8TF9NrSJqUVeyZlns2PceqXBRY4ZgCqtdx9MblXRac QvEQ1zmoyB871bUacHUv77QIYY617PeH4d3N1TqzPektopKWdBkc+eSWeu3VHspw y2Dcw8uWZp+hvnOODCmUYlOqrw1x5Z4ao3aPQRK2VQamWyzaz2oG1FCrUdvLwrnP 37iKSD+xBeqSRZyULhbSKQAQWinGKfU1oRaak8nVbPA7j3KlrGk=
=D8OJ
-----END PGP SIGNATURE-----
--- SoupGate-Win32 v1.05
* Origin: you cannot sedate... all the things you hate (1:229/2)