Skip to content

Commit

Permalink
Fixing stat structure for OSX
Browse files Browse the repository at this point in the history
  • Loading branch information
khuck committed Aug 4, 2021
1 parent d78a9a6 commit 4be2e25
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/apex/otf2_listener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -569,8 +569,13 @@ namespace apex {
while (stat(apex_options::otf2_archive_path(), &stat_buf) != 0) {}
/* get a start time for the trace, relative to when
* the archive was created. */
#if defined(__APPLE__)
globalOffset = (stat_buf.st_mtimespec.tv_sec * 1000000000) +
stat_buf.st_mtimespec.tv_nsec + synchronizeClocks();
#else
globalOffset = (stat_buf.st_mtim.tv_sec * 1000000000) +
stat_buf.st_mtim.tv_nsec + synchronizeClocks();
#endif
_initialized = true;
return;
}
Expand Down

0 comments on commit 4be2e25

Please sign in to comment.