ObjFW  Diff

Differences From Artifact [ac9c1835dc]:

To Artifact [55ed0932ea]:


229
230
231
232
233
234
235





236
237
238






239
240
241
242
243
244
245
229
230
231
232
233
234
235
236
237
238
239
240
241
242

243
244
245
246
247
248
249
250
251
252
253
254
255







+
+
+
+
+


-
+
+
+
+
+
+







# else
	if ((sock = socket(AF_APPLETALK, SOCK_DGRAM, 0)) < 0)
# endif
		@throw [OFSetOptionFailedException
		    exceptionWithObject: nil
				  errNo: OFSocketErrNo()];

	/*
	 * NetBSD requires the address to be removed, while Linux ignores the
	 * address entirely.
	 */

	memset(&request, 0, sizeof(request));
	strncpy(request.ifr_name, interfaceName.UTF8String, IFNAMSIZ - 1);
	request.ifr_addr.sa_family = AF_APPLETALK;

	if (ioctl(sock, SIOCGIFADDR, &request) != 0)
		if (errno != EADDRNOTAVAIL)
			@throw [OFSetOptionFailedException
			    exceptionWithObject: nil
					  errNo: OFSocketErrNo()];

	if (ioctl(sock, SIOCDIFADDR, &request) != 0)
		@throw [OFSetOptionFailedException
		    exceptionWithObject: nil
				  errNo: OFSocketErrNo()];
}
#endif