View Issue Details

IDProjectCategoryView StatusLast Update
0037172FPCRTLpublic2020-06-03 22:55
Reportersuve Assigned ToMichael Van Canneyt  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformaarch64OSLinux 
Fixed in Version3.2.0 
Summary0037172: fixes_3_2: Identifier not found "AT_SYMLINK_NOFOLLOW"
DescriptionOn the fixes_3_2 branch, revision 45533 added changed some code in rtl/linux/bunxsysc.inc from
    fpLStat:=do_syscall(syscall_nr_fstatat,AT_FDCWD,TSysParam(path),TSysParam(info),0)
to
    fpLStat:=do_syscall(syscall_nr_fstatat,AT_FDCWD,TSysParam(path),TSysParam(info),AT_SYMLINK_NOFOLLOW)

However, AT_SYMLINK_NOFOLLOW is not defined anywhere. This causes the build to fail on aarch64.

This seems to be a simple omission, since r45533 basically merges changes done to trunk in r43880 - and in trunk, an earlier revision, r43837, added (among others) a definition of AT_SYMLINK_NOFOLLOW to rtl/linux/ostypes.inc. However, the changes from r43837 have not been applied to fixes_3_2.

The attached patch takes the changes done to trunk/rtl/linux/ostypes.inc done in r43837 and applies them to branches/fixes_3_2/rtl/linux/ostypes.inc.
TagsNo tags attached.
Fixed in Revision45584
FPCOldBugId
FPCTarget3.2.0
Attached Files

Activities

suve

2020-06-03 17:02

reporter  

fpc-3.2.0-missing-AT_SYMLINK_NOFOLLOW.patch (1,185 bytes)   
--- branches/fixes_3_2/rtl/linux/ostypes.inc	2020-06-03 15:53:12.831274022 +0200
+++ branches/fixes_3_2/rtl/linux/ostypes.inc	2020-06-03 16:23:11.857701092 +0200
@@ -291,11 +291,21 @@
 {$endif not cpumips}
 {$endif not (cpusparc or cpusparc64)}
 
     AT_FDCWD = -100;
+    AT_SYMLINK_NOFOLLOW = $100;
     AT_REMOVEDIR = $200;
+    AT_SYMLINK_FOLLOW = $400;
+    AT_NO_AUTOMOUNT = $800;
+    AT_EMPTY_PATH = $1000;
+    AT_STATX_SYNC_TYPE = $6000;
+    AT_STATX_SYNC_AS_STAT = $0000;
+    AT_STATX_FORCE_SYNC = $2000;
+    AT_STATX_DONT_SYNC = $4000;
+    AT_RECURSIVE = $8000;
+
+    { SIGCHLD or CLONE_CHILD_CLEARTID or CLONE_CHILD_SETTID }
     clone_flags_fork = $01200011;
-      { SIGCHLD | CLONE_CHILD_CLEARTID | CLONE_CHILD_SETTID }
 
 {$if defined(cpuarm) or defined(cpualpha) or defined(cpublackfin) or defined(cpum68k) or defined(aarch64)}
     O_LARGEFILE =   $20000;
 {$endif}
@@ -337,8 +347,11 @@
   S_IFBLK = 24576; { block special}
   S_IFREG = 32768; { regular }
   S_IFLNK = 40960; { symbolic link }
   S_IFSOCK= 49152; { socket }
+  S_ISUID = &4000;
+  S_ISGID = &2000;
+  S_ISVTX = &1000;
 
   { Constansts for MMAP }
  {$IFDEF FPC_IS_SYSTEM}
   MAP_PRIVATE   =2;

Michael Van Canneyt

2020-06-03 22:55

administrator   ~0123212

Applied, thank you for the patch.

Issue History

Date Modified Username Field Change
2020-06-03 17:02 suve New Issue
2020-06-03 17:02 suve File Added: fpc-3.2.0-missing-AT_SYMLINK_NOFOLLOW.patch
2020-06-03 22:55 Michael Van Canneyt Assigned To => Michael Van Canneyt
2020-06-03 22:55 Michael Van Canneyt Status new => resolved
2020-06-03 22:55 Michael Van Canneyt Resolution open => fixed
2020-06-03 22:55 Michael Van Canneyt Fixed in Version => 3.2.0
2020-06-03 22:55 Michael Van Canneyt Fixed in Revision => 45584
2020-06-03 22:55 Michael Van Canneyt FPCTarget => 3.2.0
2020-06-03 22:55 Michael Van Canneyt Note Added: 0123212