]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Adapt TESTrun constants for older Perl. [skip ci]
authorDenis Ovsienko <[email protected]>
Fri, 23 Jul 2021 00:24:22 +0000 (01:24 +0100)
committerDenis Ovsienko <[email protected]>
Fri, 23 Jul 2021 00:25:48 +0000 (01:25 +0100)
Solaris 9 has Perl 5.6.1, which does not support constant declaration
using a hash reference:

$ make check
./tests/TESTrun
Constant name 'HASH(0x2d8f0)' has invalid characters at ./tests/TESTrun
line 24
BEGIN failed--compilation aborted at ./tests/TESTrun line 24.
*** Error code 255
make: Fatal error: Command failed for target `check'

Declare one constant at a time to work around that and get "make check"
to start running tests (18 of which fail, but that's another issue).

tests/TESTrun

index a1319484c3efcd8453e7841f1158de4bdadfd8e7..ca42a744efe5d9b29f5187819307ee1b358b710f 100755 (executable)
@@ -21,7 +21,8 @@ if (!($TCPDUMP = $ENV{TCPDUMP_BIN})) {
 #
 # Make true and false work as Booleans.
 #
-use constant { true => 1, false => 0 };
+use constant true => 1;
+use constant false => 0;
 
 use File::Basename;
 use POSIX qw( WEXITSTATUS WIFEXITED);