Commit 6433d569 authored by Ben Walton's avatar Ben Walton Committed by Junio C Hamano

trace.c: do not mark getnanotime() as "inline"

Oracle Studio compilers don't allow for static variables in
functions that are defined to be inline. GNU C does permit this.

Let's reference the C99 standard though, which doesn't allow for
inline functions to contain modifiable static variables.
Signed-off-by: default avatarBen Walton <bdwalton@gmail.com>
Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
parent 62b553cd
......@@ -384,7 +384,7 @@ static inline uint64_t gettimeofday_nanos(void)
* Returns nanoseconds since the epoch (01/01/1970), for performance tracing
* (i.e. favoring high precision over wall clock time accuracy).
*/
inline uint64_t getnanotime(void)
uint64_t getnanotime(void)
{
static uint64_t offset;
if (offset > 1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment