Browse Source

+ request the FD_FILESTAT_GET capability when opening files

git-svn-id: trunk@49539 -
nickysn 4 years ago
parent
commit
c48f27225e
1 changed files with 3 additions and 3 deletions
  1. 3 3
      rtl/wasi/sysfile.inc

+ 3 - 3
rtl/wasi/sysfile.inc

@@ -222,15 +222,15 @@ Begin
 { We do the conversion of filemodes here, concentrated on 1 place }
 { We do the conversion of filemodes here, concentrated on 1 place }
   case (flags and 3) of
   case (flags and 3) of
    0 : begin
    0 : begin
-         fs_rights_base :=__WASI_RIGHTS_FD_READ;
+         fs_rights_base :=__WASI_RIGHTS_FD_READ or __WASI_RIGHTS_FD_FILESTAT_GET;
          FileRec(f).mode:=fminput;
          FileRec(f).mode:=fminput;
        end;
        end;
    1 : begin
    1 : begin
-         fs_rights_base :=__WASI_RIGHTS_FD_WRITE;
+         fs_rights_base :=__WASI_RIGHTS_FD_WRITE or __WASI_RIGHTS_FD_FILESTAT_GET;
          FileRec(f).mode:=fmoutput;
          FileRec(f).mode:=fmoutput;
        end;
        end;
    2 : begin
    2 : begin
-         fs_rights_base :=__WASI_RIGHTS_FD_READ or __WASI_RIGHTS_FD_WRITE;
+         fs_rights_base :=__WASI_RIGHTS_FD_READ or __WASI_RIGHTS_FD_WRITE or __WASI_RIGHTS_FD_FILESTAT_GET;
          FileRec(f).mode:=fminout;
          FileRec(f).mode:=fminout;
        end;
        end;
   end;
   end;