Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
d45d751d
Commit
d45d751d
authored
Mar 14, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libport: Avoid issues with struct timeval on Windows.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fb4c1277
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
mkstemps.c
libs/port/mkstemps.c
+8
-4
poll.c
libs/port/poll.c
+7
-0
No files found.
libs/port/mkstemps.c
View file @
d45d751d
...
...
@@ -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
)
{
...
...
libs/port/poll.c
View file @
d45d751d
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment