Re: connectx() function availability
Re: connectx() function availability
- Subject: Re: connectx() function availability
- From: Damien DeVille <email@hidden>
- Date: Fri, 17 Mar 2017 08:33:42 -0700
Probably not ideal but if you have access to the source that uses `connectx` could you resolve the symbol at runtime on newer OS versions with dlopen/dlsym?
On Fri, Mar 17, 2017, at 03:23 AM, Pavol Markovic wrote:
> Hello,
> I'm working on a product statically linking (non-system) libcurl and it
> is crashing on OS X 10.8 due to missing _connectx symbol in
> /usr/lib/libSystem.B.dylib
>
> Man page shows that:
> The connectx() function call appeared in Darwin 15.0.0
>
> Why is connectx() function in <sys/socket.h> not marked for weak-linking?
> As I understand it's recommended to use weak-linking when extending
> dynamic library (libsystem-kernel.dylib in this case).
>
> As a result the libcurl cannot use connectx() fast tcp connect on 10.11
> (and later) and at the same time targetting previous systems which do not
> have this function at all.
>
> Any idea how to solve this except of doing preprocessor checks like:
>
> #if defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
> # if (__MAC_OS_X_VERSION_MIN_REQUIRED >= 101100)
> # define HAVE_DARWIN_CONNECTX 1
> # endif
> #elif defined(__IPHONE_OS_VERSION_MIN_REQUIRED)
> # if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 90000)
> # define HAVE_DARWIN_CONNECTX 1
> # endif
> #elif defined(CONNECT_DATA_IDEMPOTENT) /* Fallback for other Darwin OS
> */
> # define HAVE_DARWIN_CONNECTX 1
> #endif
>
> Best regards,
> Pavol Markovic
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Darwin-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden