libport: Avoid issues with struct timeval on Windows.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
fb4c127705
commit
d45d751d76
|
@ -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. */
|
||||
#ifndef _WIN32
|
||||
{
|
||||
struct timeval tv;
|
||||
gettimeofday( &tv, NULL );
|
||||
value += ((unsigned __int64) tv.tv_usec << 16) ^ tv.tv_sec ^ getpid ();
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue