Skip to content

Commit 6433d56

Browse files
bdwaltongitster
authored andcommitted
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: Ben Walton <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 62b553c commit 6433d56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

trace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ static inline uint64_t gettimeofday_nanos(void)
384384
* Returns nanoseconds since the epoch (01/01/1970), for performance tracing
385385
* (i.e. favoring high precision over wall clock time accuracy).
386386
*/
387-
inline uint64_t getnanotime(void)
387+
uint64_t getnanotime(void)
388388
{
389389
static uint64_t offset;
390390
if (offset > 1) {

0 commit comments

Comments
 (0)