/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2018, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2021, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure, Markus Armbruster
*
* Empire is free software: you can redistribute it and/or modify
* chance.c: Roll dice
*
* Known contributors to this file:
- * Markus Armbruster, 2006-2012
+ * Markus Armbruster, 2006-2021
*/
#include <config.h>
unsigned
pick_seed(void)
{
- int fd;
unsigned seed;
int got_seed = 0;
struct timeval tv;
pid_t pid;
+#ifndef _WIN32
+ int fd;
/*
* Modern systems provide random number devices, but the details
got_seed = read(fd, &seed, sizeof(seed)) == sizeof(seed);
close(fd);
}
+#endif
if (!got_seed) {
/* Kernel didn't provide, fall back to hashing time and PID */