connectx() function availability
connectx() function availability
- Subject: connectx() function availability
- From: Pavol Markovic <email@hidden>
- Date: Fri, 17 Mar 2017 23:23:47 +1300
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