File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 1
- /* Copyright (c) 2000, 2016 , Oracle and/or its affiliates. All rights reserved.
1
+ /* Copyright (c) 2000, 2017 , Oracle and/or its affiliates. All rights reserved.
2
2
3
3
This program is free software; you can redistribute it and/or modify
4
4
it under the terms of the GNU General Public License as published by
35
35
#include < my_dir.h>
36
36
#include < hash.h>
37
37
#include < stdarg.h>
38
+ #include < string>
38
39
#include < violite.h>
39
40
#include " my_regex.h" /* Our own version of regex */
40
41
#ifdef HAVE_SYS_WAIT_H
52
53
53
54
using std::min;
54
55
using std::max;
56
+ using std::string;
55
57
56
58
#ifdef __WIN__
57
59
#include < crtdbg.h>
@@ -4237,7 +4239,11 @@ void do_perl(struct st_command *command)
4237
4239
die (" Failed to create temporary file for perl command" );
4238
4240
my_close (fd, MYF (0 ));
4239
4241
4240
- str_to_file (temp_file_path, ds_script.str , ds_script.length );
4242
+ /* Compatibility for Perl 5.24 and newer. */
4243
+ string script = " push @INC, \" .\" ;\n " ;
4244
+ script.append (ds_script.str , ds_script.length );
4245
+
4246
+ str_to_file (temp_file_path, &script[0 ], script.size ());
4241
4247
4242
4248
/* Format the "perl <filename>" command */
4243
4249
my_snprintf (buf, sizeof (buf), " perl %s" , temp_file_path);
Original file line number Diff line number Diff line change 1
1
# !/usr/bin/perl
2
2
# -*- cperl -*-
3
3
4
- # Copyright (c) 2004, 2016 , Oracle and/or its affiliates. All rights reserved.
4
+ # Copyright (c) 2004, 2017 , Oracle and/or its affiliates. All rights reserved.
5
5
#
6
6
# This program is free software; you can redistribute it and/or modify
7
7
# it under the terms of the GNU General Public License as published by
@@ -100,6 +100,8 @@ BEGIN
100
100
use IO::Socket::INET;
101
101
use IO::Select;
102
102
103
+ push @INC , " ." ;
104
+
103
105
require " lib/mtr_process.pl" ;
104
106
require " lib/mtr_io.pl" ;
105
107
require " lib/mtr_gcov.pl" ;
You can’t perform that action at this time.
0 commit comments