summaryrefslogtreecommitdiff
path: root/include/asterisk/time.h
diff options
context:
space:
mode:
authorDiederik de Groot <ddegroot@talon.nl>2016-01-07 10:21:03 +0100
committerDiederik de Groot <ddegroot@talon.nl>2016-01-08 06:20:22 +0100
commit6745cd65299f997f02cc1e676a6df529100482eb (patch)
tree31486d78f5d63580275350f85eae185bf717b206 /include/asterisk/time.h
parent9cded6eb367a65b7c8cfbc075ebddf8063b98aa3 (diff)
include/asterisk/time.h: Renamed global declaration:tv
Renamed global declaration:tv to dummy_tv_var_for_types, which would oltherwise cause 'shadow' warnings when 'tv' was declared as a local variable elsewhere. Added comment to note that dummy_tv_var_for_types is never really exported and only used as a place holder. ASTERISK-25627 #close Change-Id: I9a6e17995006584f3627efe8988e3f8aa0f5dc28
Diffstat (limited to 'include/asterisk/time.h')
-rw-r--r--include/asterisk/time.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/asterisk/time.h b/include/asterisk/time.h
index 529490630..f49d68951 100644
--- a/include/asterisk/time.h
+++ b/include/asterisk/time.h
@@ -37,10 +37,12 @@
/* We have to let the compiler learn what types to use for the elements of a
struct timeval since on linux, it's time_t and suseconds_t, but on *BSD,
- they are just a long. */
-extern struct timeval tv;
-typedef typeof(tv.tv_sec) ast_time_t;
-typedef typeof(tv.tv_usec) ast_suseconds_t;
+ they are just a long.
+ note:dummy_tv_var_for_types never actually gets exported, only used as
+ local place holder. */
+extern struct timeval dummy_tv_var_for_types;
+typedef typeof(dummy_tv_var_for_types.tv_sec) ast_time_t;
+typedef typeof(dummy_tv_var_for_types.tv_usec) ast_suseconds_t;
/*!
* \brief Computes the difference (in seconds) between two \c struct \c timeval instances.