Ticket #4272: DiskSpace.pm.patch

File DiskSpace.pm.patch, 653 bytes (added by vincent-opdarw@…, 19 years ago)

Patch that adds darwin support and removes 2 unused variables.

  • Filesys/DiskSpace.pm

    old new  
    8989    $res = syscall (&main::SYS_statfs, $dir, $fmt);
    9090    # statfs...
    9191
    92     if ($^O eq 'freebsd') {
     92    if ($^O eq 'freebsd' || $^O eq 'darwin') {
    9393      # only tested with FreeBSD 3.0. Should also work with 4.0.
    94       my ($f1, $f2);
    95       ($f1, $bsize, $f2, $blocks, $bfree, $bavail, $files, $ffree) =
     94      (undef, $bsize, undef, $blocks, $bfree, $bavail, $files, $ffree) =
    9695        unpack "L8", $fmt;
    9796      $type = 0; # read it from 'f_type' field ?
    9897    }