Skip to content

Commit bb65358

Browse files
nwc10demerphq
authored andcommitted
bisect-runner.pl must ensure that perl.h includes fcntl.h and sys/file.h
The C code needs prototypes from these headers.
1 parent ceff7c9 commit bb65358

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

Porting/bisect-runner.pl

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4200,6 +4200,33 @@ sub patch_C {
42004200
EOPATCH
42014201
}
42024202
4203+
if ($major < 6 && $^O eq 'darwin'
4204+
&& !extract_from_file('perl.h', qr/ifdef I_FCNTL/)) {
4205+
# This is part of commit 9a34ef1dede5fef4, but in a stable part of the
4206+
# file:
4207+
apply_patch(<<'EOPATCH')
4208+
diff --git a/perl.h b/perl.h
4209+
index 0d3f0b8333..19f6684894 100644
4210+
--- a/perl.h
4211+
+++ b/perl.h
4212+
@@ -310,6 +310,14 @@ register struct op *Perl_op asm(stringify(OP_IN_REGISTER));
4213+
# define BYTEORDER 0x1234
4214+
#endif
4215+
4216+
+#ifdef I_FCNTL
4217+
+# include <fcntl.h>
4218+
+#endif
4219+
+
4220+
+#ifdef I_SYS_FILE
4221+
+# include <sys/file.h>
4222+
+#endif
4223+
+
4224+
/* Overall memory policy? */
4225+
#ifndef CONSERVATIVE
4226+
# define LIBERAL 1
4227+
EOPATCH
4228+
}
4229+
42034230
if ($major == 7 && $^O eq 'aix' && -f 'ext/List/Util/Util.xs'
42044231
&& extract_from_file('ext/List/Util/Util.xs', qr/PUSHBLOCK/)
42054232
&& !extract_from_file('makedef.pl', qr/^Perl_cxinc/)) {

0 commit comments

Comments
 (0)