perl: fix compilation of Time-HiRes functions, incl. clock_gettime.

This commit is contained in:
Leah Neukirchen 2018-06-06 17:30:06 +02:00
parent 05c1037d68
commit ce6a59df4d
2 changed files with 35 additions and 1 deletions
srcpkgs/perl

View file

@ -0,0 +1,34 @@
--- 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';

View file

@ -1,7 +1,7 @@
# Template build file for 'perl'.
pkgname=perl
version=5.26.1
revision=4
revision=5
_perl_cross_version=1.1.6
build_style=gnu-configure
hostmakedepends="less"