summaryrefslogtreecommitdiff
path: root/lang/parrot/patches/patch-am
blob: 946a51d2ed7d5b3b1344f06ac80308aa973f2e39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
$NetBSD: patch-am,v 1.2 2011/04/06 11:25:31 he Exp $

Perl uses stat(2) and lstat(2) directly, and those system calls may
not fill in st_rdev, leaving garbage behind.  Parrot, on the other hand,
sets the st_rdev member always to 0 in stat_buf_to_array() in dynpmc/os.pmc,
so compensate for this by zeroing the st_rdev member from the perl stat
and lstat operations.

--- t/dynpmc/os.t.orig	2011-03-15 08:01:43.000000000 +0000
+++ t/dynpmc/os.t
@@ -324,6 +324,7 @@ my $stat;
 
 my $count = $MSWin32 ? 11 : 13;
 my @s = stat('xpto');
+$s[6] = 0; # Parrot does this internally...
 if ( $cygwin ) {
     # Mask inode number (fudge it)
     $s[1] &= 0xffffffff;
@@ -483,6 +484,7 @@ SKIP: {
     skip 'broken test TT #457', 1 if $solaris;
 
     my @s = lstat('xpto');
+    $s[6] = 0; # Parrot does this internally...
     if ($cygwin) {
         # Mask inode number (fudge it)
         $s[1] &= 0xffffffff;