Skip to content

Commit ceff7c9

Browse files
nwc10demerphq
authored andcommitted
bisect-runner.pl must ensure prototypes exist for htovs() etc
These fallback functions are defined in util.c, but initially did not have any prototypes in a header.
1 parent 0f74d84 commit ceff7c9

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

Porting/bisect-runner.pl

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4266,8 +4266,26 @@ sub patch_C {
42664266
EOPATCH
42674267
}
42684268

4269-
if ($major < 8 && $^O eq 'openbsd'
4270-
&& !extract_from_file('perl.h', qr/include <unistd\.h>/)) {
4269+
if ($major < 8 && !extract_from_file('perl.h', qr/\bshort htovs\b/)) {
4270+
# This is part of commit c623ac675720b314
4271+
apply_patch(<<'EOPATCH');
4272+
diff --git a/perl.h b/perl.h
4273+
index 023b90b7ea..59a21faecd 100644
4274+
--- a/perl.h
4275+
+++ b/perl.h
4276+
@@ -2279,4 +2279,8 @@ struct ptr_tbl {
4277+
# endif
4278+
/* otherwise default to functions in util.c */
4279+
+short htovs(short n);
4280+
+short vtohs(short n);
4281+
+long htovl(long n);
4282+
+long vtohl(long n);
4283+
#endif
4284+
4285+
EOPATCH
4286+
}
4287+
4288+
if ($major < 8 && !extract_from_file('perl.h', qr/include <unistd\.h>/)) {
42714289
# This is part of commit 3f270f98f9305540, applied at a slightly
42724290
# different location in perl.h, where the context is stable back to
42734291
# 5.000

0 commit comments

Comments
 (0)