mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
tests: old g++ needs explicit cast
This commit is contained in:
parent
c818f3dabc
commit
0e8c631f5e
@ -103,8 +103,8 @@ class Timespec {
|
|||||||
struct timespec ts;
|
struct timespec ts;
|
||||||
static const long _NSEC_PER_SEC = 1000000000;
|
static const long _NSEC_PER_SEC = 1000000000;
|
||||||
public:
|
public:
|
||||||
Timespec( time_t _sec = 0, long _nsec = 0 ) { ts = { _sec, _nsec }; }
|
Timespec( time_t _sec = 0, long _nsec = 0 ) { ts = (struct timespec) { _sec, _nsec }; }
|
||||||
Timespec( const struct timeval &tv ) { ts = { tv.tv_sec, tv.tv_usec * 1000 }; }
|
Timespec( const struct timeval &tv ) { ts = (struct timespec) { tv.tv_sec, tv.tv_usec * 1000 }; }
|
||||||
long sec() const { return (long)ts.tv_sec; }
|
long sec() const { return (long)ts.tv_sec; }
|
||||||
long nsec() const { return (long)ts.tv_nsec; }
|
long nsec() const { return (long)ts.tv_nsec; }
|
||||||
void gettime() {
|
void gettime() {
|
||||||
@ -941,7 +941,7 @@ struct TestCase {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct timeval wait = { 0, 500000 /* timeout 0.5s */ };
|
struct timeval wait = (struct timeval) { 0, 500000 /* timeout 0.5s */ };
|
||||||
fd_set set;
|
fd_set set;
|
||||||
|
|
||||||
FD_ZERO( &set );
|
FD_ZERO( &set );
|
||||||
|
Loading…
Reference in New Issue
Block a user