summaryrefslogtreecommitdiff
path: root/rtl/linux
diff options
context:
space:
mode:
authorflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2017-07-07 12:22:49 +0000
committerflorian <florian@3ad0048d-3df7-0310-abae-a5850022a9f2>2017-07-07 12:22:49 +0000
commitda377b5fae2adbafb9f49f8ad4fc0b11d7a9e327 (patch)
treeb571f3618b7c5beb8e18431bf8802905d96b2f69 /rtl/linux
parent7d3acefa174164726e470778763805baee68518a (diff)
downloadfpc-da377b5fae2adbafb9f49f8ad4fc0b11d7a9e327.tar.gz
* force usage of stat64 on sparc64
* always use packrecords c for the stat records on sparc64 git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@36664 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'rtl/linux')
-rw-r--r--rtl/linux/ossysc.inc3
-rw-r--r--rtl/linux/sparc64/stat.inc4
2 files changed, 4 insertions, 3 deletions
diff --git a/rtl/linux/ossysc.inc b/rtl/linux/ossysc.inc
index 6e802b480c..1d97afa4b3 100644
--- a/rtl/linux/ossysc.inc
+++ b/rtl/linux/ossysc.inc
@@ -122,7 +122,8 @@ end;
function Fpstat(path: pchar; var buf: stat):cint; [public, alias : 'FPC_SYSC_STAT'];
begin
-{$if defined(cpu64)}
+{ standard stat call is 32 bit on sparc64, so explicitly force a stat64 call }
+{$if defined(cpu64) and not(defined(cpusparc64))}
{$if defined(generic_linux_syscalls)}
Fpstat:=do_syscall(syscall_nr_fstatat,AT_FDCWD,TSysParam(path),TSysParam(@buf),0);
{$else}
diff --git a/rtl/linux/sparc64/stat.inc b/rtl/linux/sparc64/stat.inc
index 720203bb72..dcd594c2a0 100644
--- a/rtl/linux/sparc64/stat.inc
+++ b/rtl/linux/sparc64/stat.inc
@@ -12,6 +12,8 @@
**********************************************************************}
+{$PACKRECORDS C}
+
{$IFNDEF FPC_USE_LIBC}
{ do NOT declare this record as packed, because it needs to be aligned }
@@ -43,8 +45,6 @@
{$ELSE FPC_USE_LIBC}
-{$PACKRECORDS C}
-
Stat = record
st_dev : cULongLong;
st_ino : cULongLong;