Ticket #15351: osx_ext2fuse.diff

File osx_ext2fuse.diff, 1.6 KB (added by lorenz.schori@…, 16 years ago)
  • src/ext2fs.c

    old new void fill_statbuf(ext2_ino_t ino, struct 
    4949        st->st_ctime = inode->i_ctime;
    5050        // We don't have to implement nanosecs, fs's which don't can return
    5151        // 0 here:
    52         st->st_atim.tv_nsec = 0;
     52    #if (__FreeBSD__ >= 10)
     53        #ifndef _POSIX_C_SOURCE
     54            st->st_atimespec.tv_nsec = 0;
     55        st->st_mtimespec.tv_nsec = 0;
     56        st->st_ctimespec.tv_nsec = 0;
     57        #else
     58        st->st_atimensec = 0;
     59        st->st_mtimensec = 0;
     60        st->st_ctimensec = 0;
     61        #endif
     62    #else
     63    st->st_atim.tv_nsec = 0;
    5364        st->st_mtim.tv_nsec = 0;
    5465        st->st_ctim.tv_nsec = 0;
     66    #endif
    5567}
    5668
    5769int read_inode(ext2_ino_t ino, struct ext2_inode *inode)
  • src/fuse-ext2fs.c

    old new void op_access(fuse_req_t req, fuse_ino_ 
    6464                fuse_reply_err(req, EROFS);
    6565                return;
    6666        }
    67         fuse_reply_err(req,
     67    if (mask == 0){
     68        //no prims == true
     69        fuse_reply_err(req,0);
     70    }
     71    else{
     72            fuse_reply_err(req,
    6873                                check_perms(fuse_req_ctx(req), EXT2FS_INO(ino), mask));
     74    }
    6975}
    7076
    7177// This is basically stat/fstat/lstat
  • lib/ext2fs/imager.c

    old new  
    3737#include "ext2fs.h"
    3838
    3939#ifndef HAVE_TYPE_SSIZE_T
     40#if (__FreeBSD__ < 10)
    4041typedef int ssize_t;
    4142#endif
     43#endif
    4244
    4345/*
    4446 * This function returns 1 if the specified block is all zeros