void-packages/srcpkgs/perl/patches/Time-HiRes.diff

35 lines
1.3 KiB
Diff
Raw Normal View History

--- dist/Time-HiRes/Makefile.PL.orig
+++ dist/Time-HiRes/Makefile.PL
@@ -603,6 +603,7 @@
my $has_clock_gettime_emulation;
if (exists $Config{d_clock_gettime}) {
$has_clock_gettime++ if $Config{d_clock_gettime}; # Unlikely...
+ $DEFINE .= ' -DTIME_HIRES_CLOCK_GETTIME';
} elsif (has_clock_xxx('gettime')) {
$has_clock_gettime++;
$DEFINE .= ' -DTIME_HIRES_CLOCK_GETTIME';
@@ -632,6 +633,7 @@
my $has_clock_getres_emulation;
if (exists $Config{d_clock_getres}) {
$has_clock_getres++ if $Config{d_clock_getres}; # Unlikely...
+ $DEFINE .= ' -DTIME_HIRES_CLOCK_GETRES';
} elsif (has_clock_xxx('getres')) {
$has_clock_getres++;
$DEFINE .= ' -DTIME_HIRES_CLOCK_GETRES';
@@ -661,6 +663,7 @@
my $has_clock_nanosleep_emulation;
if (exists $Config{d_clock_nanosleep}) {
$has_clock_nanosleep++ if $Config{d_clock_nanosleep}; # Unlikely...
+ $DEFINE .= ' -DTIME_HIRES_CLOCK_NANOSLEEP';
} elsif (has_clock_nanosleep()) {
$has_clock_nanosleep++;
$DEFINE .= ' -DTIME_HIRES_CLOCK_NANOSLEEP';
@@ -684,6 +687,7 @@
my $has_clock;
if (exists $Config{d_clock}) {
$has_clock++ if $Config{d_clock}; # Unlikely...
+ $DEFINE .= ' -DTIME_HIRES_CLOCK';
} elsif (has_clock()) {
$has_clock++;
$DEFINE .= ' -DTIME_HIRES_CLOCK';