Wrong TStatfs record on Mac OS loaded lazarus / 33-macOS - Mac OS X ---------------------------------------------------------------------- comdora · 2022-07-04 13:15 I have installed fpc 3.2.2 and Lazarus IDE v 2.2.2 on MAC macOS Catalina 10.15.7 I am trying to use record {$if defined(cpuarm) or defined(cpuaarch64) or defined(iphonesim)}  { structure used on iPhoneOS and available on Mac OS X 10.6 and later }  tstatfs = record       bsize : cuint32;       iosize : cint32;       blocks : cuint64;       bfree : cuint64;       bavail : cuint64;       files : cuint64;       ffree : cuint64;       fsid : fsid_t;       owner : uid_t;       ftype : cuint32;       fflags : cuint32;       fssubtype : cuint32;       fstypename : array[0..(MFSNAMELEN)-1] of char;       mountpoint : array[0..(PATH_MAX)-1] of char;       mntfromname : array[0..(PATH_MAX)-1] of char;       reserved: array[0..7] of cuint32;  end; {$else}      tstatfs = record           otype : cint16;           oflags : cint16;           bsize : clong;           iosize : clong;           blocks : clong;           bfree : clong;           bavail : clong;           files : clong;           ffree : clong;           fsid : fsid_t;           fowner : uid_t;           reserved1 : cint16;           ftype : cint16;           fflags : clong;           reserved2 : array[0..1] of clong;           fstypename : array[0..(MFSNAMELEN)-1] of char;           mountpoint : array[0..(MNAMELEN)-1] of char;           mntfromname : array[0..(MNAMELEN)-1] of char;           f_reserved3: char;           reserved4: array[0..3] of clong;        end; {$endif}     pstatfs = ^tstatfs;  but the record is loaded wrong, from the {$else} part.  Any idea how to solve the problem? Thanks in advance Bojan ---------------------------------------------------------------------- Thausand · 2022-07-04 17:08 Quote from: comdora on July 04, 2022, 03:15:59 pmAny idea how to solve the problem? You can solve self  Show list defines for compile: Code: [Select]fpc -vc ---------------------------------------------------------------------- Jonas Maebe · 2022-07-04 18:01 The old stat(fs) record also works under current macOS versions. You cannot just change the stat(fs) record, you also have to change the used stat calls in that case. I have a local patch that changes all of that depending on the target macOS version (-WM) command line parameter *used to compile the RTL*, but I haven't committed it yet. ---------------------------------------------------------------------- comdora · 2022-07-04 18:39 QuoteYou cannot just change the stat(fs) record, you also have to change the used stat calls in that case. I completely agree with you, that's why I asked for everyone's opinion. In particular, I am very interested in the f_fssubtype... which is an integral part of the new... If I were to change the processor type to aacrch64 the execution asks me to upgrade system to 11.