Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xing Lin
qemu
Commits
d157e205
Commit
d157e205
authored
May 20, 2004
by
bellard
Browse files
win32 fix
git-svn-id:
svn://svn.savannah.nongnu.org/qemu/trunk@833
c046a42c-6fe2-441c-8c8c-71466251a162
parent
5f21aef2
Changes
1
Hide whitespace changes
Inline
Side-by-side
hw/m48t59.c
View file @
d157e205
...
...
@@ -68,7 +68,11 @@ static void get_time (m48t59_t *NVRAM, struct tm *tm)
time_t
t
;
t
=
time
(
NULL
)
+
NVRAM
->
time_offset
;
localtime_r
(
&
t
,
tm
);
#ifdef _WIN32
memcpy
(
tm
,
localtime
(
&
t
),
sizeof
(
*
tm
));
#else
localtime_r
(
&
t
,
tm
)
;
#endif
}
static
void
set_time
(
m48t59_t
*
NVRAM
,
struct
tm
*
tm
)
...
...
@@ -130,7 +134,11 @@ static void alarm_cb (void *opaque)
static
void
get_alarm
(
m48t59_t
*
NVRAM
,
struct
tm
*
tm
)
{
localtime_r
(
&
NVRAM
->
alarm
,
tm
);
#ifdef _WIN32
memcpy
(
tm
,
localtime
(
&
NVRAM
->
alarm
),
sizeof
(
*
tm
));
#else
localtime_r
(
&
NVRAM
->
alarm
,
tm
);
#endif
}
static
void
set_alarm
(
m48t59_t
*
NVRAM
,
struct
tm
*
tm
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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