Skip to content

Commit 2d41a26

Browse files
mistydemeoiabyn
authored andcommitted
Time::HiRes: fix Darwins with clock_gettime
Not all of the Darwin time code was guarded by the same set of #ifdefs, leading to bugs on Darwin platforms with clock_gettime where a struct would not be defined but would still be used elsewhere.
1 parent c04c2bf commit 2d41a26

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dist/Time-HiRes/HiRes.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ our @EXPORT_OK = qw (usleep sleep ualarm alarm gettimeofday time tv_interval
2828
stat lstat
2929
);
3030

31-
our $VERSION = '1.9733';
31+
our $VERSION = '1.9734';
3232
our $XS_VERSION = $VERSION;
3333
$VERSION = eval $VERSION;
3434

dist/Time-HiRes/HiRes.xs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,7 @@ BOOT:
940940
}
941941
# endif
942942
#endif
943-
#if defined(PERL_DARWIN)
943+
#if defined(PERL_DARWIN) && !defined(CLOCK_REALTIME)
944944
# ifdef USE_ITHREADS
945945
MUTEX_INIT(&darwin_time_mutex);
946946
# endif

0 commit comments

Comments
 (0)