mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-16 21:28:33 +03:00
timer.h: Fix compiler warnings about redefinition
This commit is contained in:
@@ -32,10 +32,29 @@
|
|||||||
struct osmo_timeval {
|
struct osmo_timeval {
|
||||||
unsigned long expires;
|
unsigned long expires;
|
||||||
};
|
};
|
||||||
|
#ifdef timerisset
|
||||||
|
#undef timerisset
|
||||||
|
#endif
|
||||||
#define timerisset(tvp) ((tvp)->expires)
|
#define timerisset(tvp) ((tvp)->expires)
|
||||||
|
|
||||||
|
#ifdef timerclear
|
||||||
|
#undef timerclear
|
||||||
|
#endif
|
||||||
#define timerclear(tvp) (tvp)->expires = 0
|
#define timerclear(tvp) (tvp)->expires = 0
|
||||||
|
|
||||||
|
#ifdef timercmp
|
||||||
|
#undef timercmp
|
||||||
|
#endif
|
||||||
#define timercmp(a, b, CMP) (a)->expires CMP (b)->expires
|
#define timercmp(a, b, CMP) (a)->expires CMP (b)->expires
|
||||||
|
|
||||||
|
#ifdef timersub
|
||||||
|
#undef timersub
|
||||||
|
#endif
|
||||||
#define timersub(a, b, result) (result)->expires = (a)->expires - (b)->expires
|
#define timersub(a, b, result) (result)->expires = (a)->expires - (b)->expires
|
||||||
|
|
||||||
|
#ifdef timeradd
|
||||||
|
#undef timeradd
|
||||||
|
#endif
|
||||||
#define timeradd(a, b, result) (result)->expires = (a)->expires + (b)->expires
|
#define timeradd(a, b, result) (result)->expires = (a)->expires + (b)->expires
|
||||||
struct timezone;
|
struct timezone;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user