···5050#include <sys/utsname.h>
5151#include <errno.h>
5252#include <sys/wait.h>
5353+#include <sys/time.h>
53545455#define CHECK_PAGER \
5556 if ((CurrentMenu == MENU_PAGER) && (idx >= 0) && \
···28582859 return 0;
28592860}
2860286128622862+static void mutt_srandom (void)
28632863+{
28642864+ struct timeval tv;
28652865+ unsigned seed;
28662866+28672867+ gettimeofday(&tv, NULL);
28682868+ /* POSIX.1-2008 states that seed is 'unsigned' without specifying its width.
28692869+ * Use as many of the lower order bits from the current time of day as the seed.
28702870+ * If the upper bound is truncated, that is fine.
28712871+ */
28722872+ seed = (tv.tv_sec << 20) | tv.tv_usec;
28732873+ srandom(seed);
28742874+}
28752875+28612876void mutt_init (int skip_sys_rc, LIST *commands)
28622877{
28632878 struct passwd *pw;
···28742889 ReverseAlias = hash_create (1031, 1);
2875289028762891 mutt_menu_init ();
28922892+ mutt_srandom ();
2877289328782894 /*
28792895 * XXX - use something even more difficult to predict?