瀏覽代碼

* Adjust for OpenBSD struct changes in the 'dirent' structure. Based on OpenBSD
ports patch patch-fpcsrc_rtl_bsd_ostypes_inc

git-svn-id: trunk@41642 -

nickysn 6 年之前
父節點
當前提交
2564588bf7
共有 1 個文件被更改,包括 10 次插入0 次删除
  1. 10 0
      rtl/bsd/ostypes.inc

+ 10 - 0
rtl/bsd/ostypes.inc

@@ -167,6 +167,16 @@ TYPE
         d_unused2     : cuint32;                        // reserved
         d_unused2     : cuint32;                        // reserved
         d_name        : array[0..255] of char;          // name, null terminated
         d_name        : array[0..255] of char;          // name, null terminated
    end;
    end;
+{$elseif defined(openbsd)}
+   dirent  = record
+        d_fileno      : ino_t;
+        d_off         : off_t;
+        d_reclen      : cuint16;                        // length of this record
+        d_type        : cuint8;                         // file type, see below
+        d_namlen      : cuint8;                         // length of string in d_name
+        d_padding     : array[0..3] of cuint8;
+        d_name        : array[0..(255 + 1)-1] of char;  // name must be no longer than this
+   end;
 {$else}
 {$else}
    dirent  = record
    dirent  = record
         d_fileno      : cuint32;                        // file number of entry
         d_fileno      : cuint32;                        // file number of entry