In <
https://opensource.apple.com/source/xnu/xnu-2422.1.72/libsyscall/wrappers/libproc/libproc.h.auto.html>
we see this:

int proc_pidinfo(int pid, int flavor, uint64_t arg,  void *buffer, int
buffersize) __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0);


it is this part here:

 __OSX_AVAILABLE_STARTING(__MAC_10_5, __IPHONE_2_0


that is automatically defined by the SDK features into either being a
weakly linked or strongly linked function, depending on your
MAX_ALLOWED and MIN_REQUIRED settings.


So that is why with the usual SDK usage on macOS systems, you don't
have to add the weak linking macros yourself, in most cases.


It is likely what you coded up will work, though. Thankfully, 99% of
the time, people deploy on the system they build on, so this becomes
much simpler. And people found this confusing enough that a new method
was devised instead :>


Best,


Ken

Reply via email to