Ha, ok, nice.
Note that fpc does not use
libc.pp (where all the
libc methods should be regrouped but only few are there).
The
mselibc.pas units regroup (nearly all) the libc.so methods, with the choice for users to use "external" or "dynlib" way.
With /fpc/rtl/, when a unit needs to call a
libc.so method, it adds in code declaration of the libc-method with "
external" + link libc.
So same methods are re-declared lot of time.
It should be simpler, imho, add "libc" in uses section (like msegui does with his centralized "mselibc.pas unit).
So the (hard) work is to find all the /fpc/rtl units that use "external" or "external libc" and add "CTlibc" in uses section.
And remove the declarations of methods with "external" ( that are now declared in CTlibc ).
Good luck with lot of courage and fun.
[EDIT] In attachment, mselibc.pas without any dependencies to msegui.
Note that it is possible that some /fpc/rtl/ units use some "external" methods that are not yet in mselibc.pas.
If it is the case, just copy that methods and add it into mselibc.pas (or CTlibc.pas).
Fre;D