diff --git a/src/os/gnatcoll-os-fsutil-read_symbolic_link__unix.adb b/src/os/gnatcoll-os-fsutil-read_symbolic_link__unix.adb index a9429327..5e5858cf 100644 --- a/src/os/gnatcoll-os-fsutil-read_symbolic_link__unix.adb +++ b/src/os/gnatcoll-os-fsutil-read_symbolic_link__unix.adb @@ -22,6 +22,7 @@ ------------------------------------------------------------------------------ with Interfaces.C; +with GNATCOLL.Memory; use GNATCOLL.Memory; with GNATCOLL.OS.Libc; use GNATCOLL.OS.Libc; with GNATCOLL.String_Builders; with Ada.Strings.Unbounded; @@ -38,13 +39,12 @@ is use all type SB.Static_String_Builder; Link_C_Path : SB.Static_String_Builder (Link_Path'Length + 1); - Bytes_Read : Sint_64; + Bytes_Read : GNATCOLL.Memory.ssize_t; C_Buf : C.char_array (1 .. 4096) := (others => C.nul); -- PATH_MAX is usually set to 4096 bytes, so we set the maximum -- target path length to this value. begin - Append (Link_C_Path, Link_Path); Bytes_Read := diff --git a/src/os/unix/gnatcoll-os-libc.ads b/src/os/unix/gnatcoll-os-libc.ads index 31e1423d..55dbb147 100644 --- a/src/os/unix/gnatcoll-os-libc.ads +++ b/src/os/unix/gnatcoll-os-libc.ads @@ -267,8 +267,10 @@ package GNATCOLL.OS.Libc is Import => True, Convention => C, External_Name => "symlinkat"; function ReadLink - (Path_Name : C_String; Buf : out char_array; Buf_Size : Uint_64) - return Sint_64 with + (Path_Name : C_String; + Buf : out char_array; + Buf_Size : GNATCOLL.Memory.size_t) + return GNATCOLL.Memory.ssize_t with Import => True, Convention => C, External_Name => "readlink"; end GNATCOLL.OS.Libc;