From 045ea3eb7bda56e9e60e40c85f4870eda05cb2b4 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 27 Feb 2017 23:02:26 +0100 Subject: [PATCH] timer.h: Fix compiler warnings about redefinition --- .../libosmocore/include/osmocom/core/timer.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/firmware/libosmocore/include/osmocom/core/timer.h b/firmware/libosmocore/include/osmocom/core/timer.h index c6d46e15..2f62b208 100644 --- a/firmware/libosmocore/include/osmocom/core/timer.h +++ b/firmware/libosmocore/include/osmocom/core/timer.h @@ -32,10 +32,29 @@ struct osmo_timeval { unsigned long expires; }; +#ifdef timerisset +#undef timerisset +#endif #define timerisset(tvp) ((tvp)->expires) + +#ifdef timerclear +#undef timerclear +#endif #define timerclear(tvp) (tvp)->expires = 0 + +#ifdef timercmp +#undef timercmp +#endif #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 + +#ifdef timeradd +#undef timeradd +#endif #define timeradd(a, b, result) (result)->expires = (a)->expires + (b)->expires struct timezone;