Commit d45d751d authored by Alexandre Julliard's avatar Alexandre Julliard

libport: Avoid issues with struct timeval on Windows.

parent fb4c1277
......@@ -65,7 +65,6 @@ mkstemps (
static const char letters[]
= "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
static unsigned __int64 value;
struct timeval tv;
char *XXXXXX;
size_t len;
int count;
......@@ -80,9 +79,14 @@ mkstemps (
XXXXXX = &template[len - 6 - suffix_len];
/* Get some more or less random data. */
gettimeofday (&tv, NULL);
value += ((unsigned __int64) tv.tv_usec << 16) ^ tv.tv_sec ^ getpid ();
#ifndef _WIN32
{
struct timeval tv;
gettimeofday( &tv, NULL );
value += ((unsigned __int64) tv.tv_usec << 16) ^ tv.tv_sec;
}
#endif
value += getpid();
for (count = 0; count < TMP_MAX; ++count)
{
......
......@@ -35,6 +35,13 @@
#define FD_SETSIZE 64
struct __ms_timeval
{
long tv_sec;
long tv_usec;
};
#define timeval __ms_timeval
typedef struct
{
unsigned int fd_count;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment