ObjFW  Check-in [3f9e0e0f07]

Overview
Comment:Don't compile MPTCP support on old macOS versions
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | mptcp
Files: files | file ages | folders
SHA3-256: 3f9e0e0f0717f7ebeae7b72d5d8ae54193855ae2f38f9e07ff0f454ee79eb1aa
User & Date: js on 2024-11-06 21:45:12
Other Links: branch diff | manifest | tags
Context
2024-11-07
21:15
Document -[usesMPTCP] may incorrectly return false Closed-Leaf check-in: 9a6b5d6cc4 user: js tags: mptcp
2024-11-06
21:45
Don't compile MPTCP support on old macOS versions check-in: 3f9e0e0f07 user: js tags: mptcp
2024-10-30
21:51
configure: Check if we have <linux/mptcp.h> check-in: 758e5eafae user: js tags: mptcp
Changes

Modified src/OFTCPSocket.m from [8eacf8e15c] to [7912261615].

193
194
195
196
197
198
199
200

201
202
203
204
205
206
207
193
194
195
196
197
198
199

200
201
202
203
204
205
206
207







-
+








		if (_socket != OFInvalidSocketHandle &&
		    address->family == OFSocketAddressFamilyIPv4)
			_flags |= flagMapIPv4;
		else
			_flags &= ~flagMapIPv4;
	}
#elif defined(OF_MACOS) || defined(OF_IOS)
#elif (defined(OF_MACOS) || defined(OF_IOS)) && defined(SAE_ASSOCID_ANY)
	if (_flags & flagUseMPTCP) {
		_socket = socket(AF_MULTIPATH, SOCK_STREAM | SOCK_CLOEXEC,
		    IPPROTO_TCP);

		if (_socket != OFInvalidSocketHandle)
			_flags |= flagUseConnectX;
		else
244
245
246
247
248
249
250
251

252
253
254
255
256
257
258
244
245
246
247
248
249
250

251
252
253
254
255
256
257
258







-
+







		 * IPv6 can both be used for a single connection.
		 */
		mappedIPv4 = mapIPv4(address);
		address = &mappedIPv4;
	}
#endif

#if defined(OF_MACOS) || defined(OF_IOS)
#if (defined(OF_MACOS) || defined(OF_IOS)) && defined(SAE_ASSOCID_ANY)
	if (_flags & flagUseConnectX) {
		sa_endpoints_t endpoints = {
			.sae_dstaddr = (struct sockaddr *)&address->sockaddr,
			.sae_dstaddrlen = address->length
		};

		if (connectx(_socket, &endpoints, SAE_ASSOCID_ANY, 0, NULL, 0,