Hello,
I just downloaded mutt-2.0.0 and attempted to build it on Solaris 10
(SPARC and i86) and ran into the following problem:
mutt_random.c:32: error: syntax error before 'z'
mutt_random.c:32: warning: type defaults to 'int' in declaration of 'z'
mutt_random.c:32: warning: data definition has no type or storage class
mutt_random.c: In function 'mutt_reseed':
mutt_random.c:99: error: 'u_int32_t' undeclared (first use in this function)
mutt_random.c:99: error: (Each undeclared identifier is reported only once
mutt_random.c:99: error: for each function it appears in.)
mutt_random.c:99: error: syntax error before 'tv'
I was able to work around the problem by making the changes in the
attached diff to mutt_random.c, replacing references to u_int32_t with
uint32_t.
Paul
--
Paul Keusemann pkeu...@gmail.com
4266 Joppa Court (952) 894-7805
Savage, MN 55378
--- mutt-2.0.0.orig/mutt_random.c 2020-11-03 11:50:37.000000000 -0600
+++ mutt-2.0.0/mutt_random.c 2020-11-10 15:04:20.281331083 -0600
@@ -29,7 +29,7 @@
#include <sys/types.h>
#include <unistd.h>
-static u_int32_t z[4]; /* Keep state for LFRS113 PRNG */
+static uint32_t z[4]; /* Keep state for LFRS113 PRNG */
static int rand_bytes_produced = 0;
static time_t time_last_reseed = 0;
@@ -92,11 +92,11 @@
* Use as many of the lower order bits from the current time of day as the
seed.
* If the upper bound is truncated, that is fine.
*
- * tv_sec is integral of type integer or float. Cast to 'u_int32_t' before
+ * tv_sec is integral of type integer or float. Cast to 'uint32_t' before
* bitshift in case it is a float. */
/* Finally, set our seeds */
- z[0] ^= (((u_int32_t) tv.tv_sec << 20) | tv.tv_usec);
+ z[0] ^= (((uint32_t) tv.tv_sec << 20) | tv.tv_usec);
z[1] ^= getpid () ^ z[0];
z[2] ^= getppid () ^ z[0];
z[3] ^= (intptr_t) &z[3] ^ time_last_reseed ^ z[0];